perf: add cloud scenario benchmark results#339
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
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, anddocs/guides/benchmark-results.md. - Added a TinyBDD coverage test to require that every dedicated
*Benchmarks.csscenario class has published Construction and Execution rows inbenchmark-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.
| var service = new ProductCatalogCacheAsideService( | ||
| new ScriptedProductCatalogRepository(ActiveProduct), | ||
| ProductCatalogCacheAsidePolicies.CreateFluentPolicy()); | ||
|
|
||
| _ = await service.FindAsync("SKU-42"); | ||
| return await service.FindAsync("SKU-42"); |
| var service = new InventoryLookupService( | ||
| new ScriptedInventoryClient(Transient, Available), | ||
| InventoryRetryPolicies.CreateFluentPolicy()); | ||
|
|
||
| return service.CheckAsync("SKU-42"); | ||
| } |
Test Results 1 files 1 suites 2m 34s ⏱️ Results for commit f63f82a. |
Code Coverage |
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Validation
Refs #328