Skip to content

perf: add cloud scenario benchmark results#339

Merged
JerrettDavis merged 1 commit into
mainfrom
benchmarks/cloud-scenario-results
May 23, 2026
Merged

perf: add cloud scenario benchmark results#339
JerrettDavis merged 1 commit into
mainfrom
benchmarks/cloud-scenario-results

Conversation

@JerrettDavis
Copy link
Copy Markdown
Owner

Summary

  • add dedicated BenchmarkDotNet scenarios for Ambassador, Cache-Aside, and Retry fluent/generated routes
  • publish the measured current-TFM scenario results in README and benchmark docs
  • add a TinyBDD docs drift check so dedicated benchmark classes require published construction/execution rows

Validation

  • dotnet run -c Release --framework net10.0 --project benchmarks/PatternKit.Benchmarks -- --filter Ambassador --artifacts artifacts/benchmarks --join --job short
  • dotnet run -c Release --framework net10.0 --project benchmarks/PatternKit.Benchmarks -- --filter CacheAside --artifacts artifacts/benchmarks --join --job short
  • dotnet run -c Release --framework net10.0 --project benchmarks/PatternKit.Benchmarks -- --filter Retry --artifacts artifacts/benchmarks --join --job short
  • dotnet build benchmarks/PatternKit.Benchmarks/PatternKit.Benchmarks.csproj --configuration Release --framework net10.0 --no-restore
  • dotnet test test/PatternKit.Examples.Tests/PatternKit.Examples.Tests.csproj --configuration Release --filter FullyQualifiedName~PatternKitBenchmarkCoverageTests --no-restore
  • dotnet test PatternKit.slnx --configuration Release --no-restore
  • git diff --check

Refs #328

Copilot AI review requested due to automatic review settings May 23, 2026 17:56
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands PatternKit’s BenchmarkDotNet “cloud architecture patterns” coverage by adding dedicated scenario benchmark classes for Ambassador, Cache-Aside, and Retry, publishing the latest measured results in the README/docs, and enforcing documentation drift checks so scenario timing rows stay in sync with benchmark classes.

Changes:

  • Added dedicated BenchmarkDotNet scenario benchmarks for Ambassador, Cache-Aside, and Retry (fluent vs generated; construction vs execution).
  • Published the new scenario timing rows across README.md, docs/guides/benchmarks.md, and docs/guides/benchmark-results.md.
  • Added a TinyBDD coverage test to require that every dedicated *Benchmarks.cs scenario class has published Construction and Execution rows in benchmark-results.md.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitBenchmarkCoverageTests.cs Adds a docs drift check ensuring each dedicated scenario benchmark has published Construction/Execution timing rows.
benchmarks/PatternKit.Benchmarks/Cloud/AmbassadorBenchmarks.cs Introduces Ambassador scenario benchmarks (construction + invocation) with fluent vs generated categories.
benchmarks/PatternKit.Benchmarks/Cloud/CacheAsideBenchmarks.cs Introduces Cache-Aside scenario benchmarks (policy creation + miss-then-hit workflow) with fluent vs generated categories.
benchmarks/PatternKit.Benchmarks/Cloud/RetryBenchmarks.cs Introduces Retry scenario benchmarks (policy creation + transient retry workflow) with fluent vs generated categories.
docs/guides/benchmark-results.md Publishes the expanded scenario timing table (Ambassador/Cache-Aside/Retry added).
docs/guides/benchmarks.md Updates the “Latest Snapshot” table to include the new scenario timings.
README.md Updates the benchmark snapshot table to include the new scenario timings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +31
var service = new ProductCatalogCacheAsideService(
new ScriptedProductCatalogRepository(ActiveProduct),
ProductCatalogCacheAsidePolicies.CreateFluentPolicy());

_ = await service.FindAsync("SKU-42");
return await service.FindAsync("SKU-42");
Comment on lines +27 to +32
var service = new InventoryLookupService(
new ScriptedInventoryClient(Transient, Available),
InventoryRetryPolicies.CreateFluentPolicy());

return service.CheckAsync("SKU-42");
}
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

    1 files      1 suites   2m 34s ⏱️
1 003 tests 1 003 ✅ 0 💤 0 ❌
1 008 runs  1 008 ✅ 0 💤 0 ❌

Results for commit f63f82a.

@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage

Summary
  Generated on: 05/23/2026 - 18:01:51
  Coverage date: 05/23/2026 - 17:59:54 - 05/23/2026 - 18:01:39
  Parser: MultiReport (9x Cobertura)
  Assemblies: 4
  Classes: 1450
  Files: 592
  Line coverage: 94.5%
  Covered lines: 39259
  Uncovered lines: 2242
  Coverable lines: 41501
  Total lines: 91252
  Branch coverage: 75.6% (11568 of 15299)
  Covered branches: 11568
  Total branches: 15299
  Method coverage: 96.1% (7805 of 8116)
  Full method coverage: 88.2% (7163 of 8116)
  Covered methods: 7805
  Fully covered methods: 7163
  Total methods: 8116

PatternKit.Core                                                                                                     95.5%
  PatternKit.Application.AntiCorruption.AntiCorruptionLayer<T1, T2>                                                 90.4%
  PatternKit.Application.AntiCorruption.AntiCorruptionResult<T>                                                      100%
  PatternKit.Application.AuditLog.AuditLogAppendResult<T>                                                           85.7%
  PatternKit.Application.AuditLog.InMemoryAuditLog<T1, T2>                                                          95.4%
  PatternKit.Application.DataMapping.DataMapper<T1, T2>                                                             94.6%
  PatternKit.Application.DataMapping.DataMapperError                                                                  90%
  PatternKit.Application.DataMapping.DataMapperResult<T>                                                            84.6%
  PatternKit.Application.DomainEvents.DomainEventDispatcher<T>                                                      95.4%
  PatternKit.Application.DomainEvents.DomainEventDispatchResult                                                      100%
  PatternKit.Application.EventSourcing.EventStoreAppendResult                                                        100%
  PatternKit.Application.EventSourcing.InMemoryEventStore<T1, T2>                                                   97.9%
  PatternKit.Application.EventSourcing.StoredEvent<T1, T2>                                                            80%
  PatternKit.Application.FeatureToggles.FeatureToggleDecision                                                       87.5%
  PatternKit.Application.FeatureToggles.FeatureToggleRule<T>                                                         100%
  PatternKit.Application.FeatureToggles.FeatureToggleSet<T>                                                         96.9%
  PatternKit.Application.IdentityMap.IdentityMap<T1, T2>                                                             100%
  PatternKit.Application.IdentityMap.IdentityMapResult<T>                                                           92.8%
  PatternKit.Application.MaterializedViews.MaterializedView<T1, T2>                                                 98.4%
  PatternKit.Application.Repository.InMemoryRepository<T1, T2>                                                      92.8%
  PatternKit.Application.Repository.RepositoryResult<T>                                                             93.3%
  PatternKit.Application.ServiceLayer.ServiceLayerOperation<T1, T2>                                                 96.7%
  PatternKit.Application.ServiceLayer.ServiceLayerResult<T>                                                         94.7%
  PatternKit.Application.ServiceLayer.ServiceLayerRule<T>                                                            100%
  PatternKit.Application.Specification.Specification<T>                                                              100%
  PatternKit.Application.Specification.SpecificationRegistry<T>                                                     93.3%
  PatternKit.Application.TableDataGateway.InMemoryTableDataGateway<T1, T2>                                            86%
  PatternKit.Application.TableDataGateway.TableGatewayResult<T>                                                     82.3%
  PatternKit.Application.TransactionScript.TransactionScript<T1, T2>                                                  97%
  PatternKit.Application.TransactionScript.TransactionScriptError                                                     90%
  PatternKit.Application.TransactionScript.TransactionScriptResult<T>                                                100%
  PatternKit.Application.UnitOfWork.UnitOfWork                                                                      90.9%
  PatternKit.Application.UnitOfWork.UnitOfWorkResult                                                                94.7%
  PatternKit.Application.UnitOfWork.UnitOfWorkRollbackResult                                                         100%
  PatternKit.Application.UnitOfWork.UnitOfWorkStep                                                                   100%
  PatternKit.Behavioral.Chain.ActionChain<T>                                                                         100%
  PatternKit.Behavioral.Chain.AsyncActionChain<T>                                                                    100%
  PatternKit.Behavioral.Chain.AsyncResultChain<T1, T2>                                                              97.7%
  PatternKit.Behavioral.Chain.ResultChain<T1, T2>                                                                    100%

@github-actions
Copy link
Copy Markdown
Contributor

🔍 PR Validation Results

Version: ``

✅ Validation Steps

  • Build solution
  • Run tests
  • Build documentation
  • Dry-run NuGet packaging

📊 Artifacts

Dry-run artifacts have been uploaded and will be available for 7 days.


This comment was automatically generated by the PR validation workflow.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.64%. Comparing base (86e5a59) to head (f63f82a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #339      +/-   ##
==========================================
+ Coverage   89.65%   95.64%   +5.99%     
==========================================
  Files         486      486              
  Lines       40002    40002              
  Branches     5756     5756              
==========================================
+ Hits        35864    38261    +2397     
+ Misses       1877     1741     -136     
+ Partials     2261        0    -2261     
Flag Coverage Δ
unittests 95.64% <ø> (+5.99%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JerrettDavis JerrettDavis changed the title Add cloud scenario benchmark results chore(benchmarks): Add cloud scenario benchmark results May 23, 2026
@JerrettDavis JerrettDavis changed the title chore(benchmarks): Add cloud scenario benchmark results perf: add cloud scenario benchmark results May 23, 2026
@JerrettDavis JerrettDavis merged commit 1f0977f into main May 23, 2026
14 checks passed
@JerrettDavis JerrettDavis deleted the benchmarks/cloud-scenario-results branch May 23, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants