docs: publish pattern catalog and benchmark snapshot#337
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Test Results 1 files 1 suites 2m 54s ⏱️ Results for commit 01b82e0. |
There was a problem hiding this comment.
Pull request overview
This PR updates PatternKit’s public-facing documentation to reflect the full 88-pattern production-readiness catalog, publishes a BenchmarkDotNet snapshot comparing fluent vs source-generated routes for two patterns, and adjusts MSBuild defaults so BenchmarkDotNet’s autogenerated projects can build locally (notably on Windows).
Changes:
- Replace abbreviated pattern tables in
README.mdanddocs/index.mdwith a categorized 88-pattern catalog summary. - Publish benchmark snapshot results and standardize benchmark run commands (including Windows-oriented examples).
- Prevent repo-wide multi-target/MSBuild defaults from applying to
BenchmarkDotNet.Autogenerated.csproj.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Replaces linked pattern table with 88-pattern catalog summary; adds benchmark snapshot section and example command. |
| docs/index.md | Updates docs landing page to the 88-pattern catalog summary and links to benchmark guide. |
| docs/guides/benchmarks.md | Updates benchmark commands and adds a “Latest Snapshot” section plus interpretation guidance. |
| Directory.Build.props | Adds conditions to exclude BenchmarkDotNet autogenerated projects from repo-wide defaults. |
| benchmarks/PatternKit.Benchmarks/README.md | Updates benchmark run commands and points readers to the published snapshot. |
| benchmarks/PatternKit.Benchmarks/PatternKit.Benchmarks.csproj | Simplifies the analyzer ProjectReference metadata for the generators project. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | Application Architecture | 15 | Anti-Corruption Layer, Audit Log, CQRS, Data Mapper, Domain Event, Event Sourcing, Feature Toggle, Identity Map, Materialized View, Repository, Service Layer, Specification, Table Data Gateway, Transaction Script, Unit of Work | | ||
| | Behavioral | 11 | Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor | | ||
| | Cloud Architecture | 17 | Ambassador, Backends for Frontends, Bulkhead, Cache-Aside, Circuit Breaker, External Configuration Store, Gateway Aggregation, Gateway Routing, Health Endpoint Monitoring, Leader Election, Priority Queue, Queue-Based Load Leveling, Rate Limiting, Retry, Scheduler Agent Supervisor, Sidecar, Strangler Fig | | ||
| | Creational | 5 | Abstract Factory, Builder, Factory Method, Prototype, Singleton | | ||
| | Enterprise Integration | 30 | Aggregator, Canonical Data Model, Channel Adapter, Claim Check, Competing Consumers, Content-Based Router, Control Bus, Dead Letter Channel, Event Notification, Event-Carried State Transfer, Event-Driven Consumer, Mailbox, Message Channel, Message Envelope, Message Filter, Message Store, Message Translator, Messaging Gateway, Pipes and Filters, Polling Consumer, Publish-Subscribe, Recipient List, Request-Reply, Resequencer, Routing Slip, Saga / Process Manager, Scatter-Gather, Service Activator, Splitter, Wire Tap | | ||
| | Messaging Reliability | 3 | Idempotent Receiver, Inbox, Outbox | | ||
| | Structural | 7 | Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy | |
| BenchmarkDotNet results are documented in [docs/guides/benchmarks.md](docs/guides/benchmarks.md). This snapshot was captured on Windows 11, Intel Core i9-14900K, .NET SDK 10.0.108, .NET 10.0.8, BenchmarkDotNet 0.15.8, using the `current-tfm` job. | ||
|
|
||
| | Pattern | Phase | Fluent mean | Fluent allocation | Generated mean | Generated allocation | Read | | ||
| | --- | --- | ---: | ---: | ---: | ---: | --- | | ||
| | Leader Election | Construction | 14.28 ns | 104 B | 15.91 ns | 104 B | Same allocation; fluent was slightly faster in this microbenchmark. | | ||
| | Leader Election | Execution | 43.62 ns | 360 B | 144.37 ns | 312 B | Generated allocated about 13% less memory, while fluent was faster in this path. | | ||
| | Scheduler Agent Supervisor | Construction | 47.29 ns | 400 B | 45.40 ns | 400 B | Same allocation; generated was slightly faster in this microbenchmark. | | ||
| | Scheduler Agent Supervisor | Execution | 177.46 ns | 1,304 B | 180.14 ns | 1,304 B | Effectively equivalent for this scenario. | | ||
|
|
| | Pattern | Phase | Fluent mean | Fluent allocation | Generated mean | Generated allocation | Read | | ||
| | --- | --- | ---: | ---: | ---: | ---: | --- | | ||
| | Leader Election | Construction | 14.28 ns | 104 B | 15.91 ns | 104 B | Same allocation; fluent was slightly faster in this microbenchmark. | | ||
| | Leader Election | Execution | 43.62 ns | 360 B | 144.37 ns | 312 B | Generated allocated about 13% less memory, while fluent was faster in this path. | | ||
| | Scheduler Agent Supervisor | Construction | 47.29 ns | 400 B | 45.40 ns | 400 B | Same allocation; generated was slightly faster in this microbenchmark. | | ||
| | Scheduler Agent Supervisor | Execution | 177.46 ns | 1,304 B | 180.14 ns | 1,304 B | Effectively equivalent for this scenario. | |
| | Application Architecture | 15 | Anti-Corruption Layer, Audit Log, CQRS, Data Mapper, Domain Event, Event Sourcing, Feature Toggle, Identity Map, Materialized View, Repository, Service Layer, Specification, Table Data Gateway, Transaction Script, Unit of Work | | ||
| | Behavioral | 11 | Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor | | ||
| | Cloud Architecture | 17 | Ambassador, Backends for Frontends, Bulkhead, Cache-Aside, Circuit Breaker, External Configuration Store, Gateway Aggregation, Gateway Routing, Health Endpoint Monitoring, Leader Election, Priority Queue, Queue-Based Load Leveling, Rate Limiting, Retry, Scheduler Agent Supervisor, Sidecar, Strangler Fig | | ||
| | Creational | 5 | Abstract Factory, Builder, Factory Method, Prototype, Singleton | | ||
| | Enterprise Integration | 30 | Aggregator, Canonical Data Model, Channel Adapter, Claim Check, Competing Consumers, Content-Based Router, Control Bus, Dead Letter Channel, Event Notification, Event-Carried State Transfer, Event-Driven Consumer, Mailbox, Message Channel, Message Envelope, Message Filter, Message Store, Message Translator, Messaging Gateway, Pipes and Filters, Polling Consumer, Publish-Subscribe, Recipient List, Request-Reply, Resequencer, Routing Slip, Saga / Process Manager, Scatter-Gather, Service Activator, Splitter, Wire Tap | | ||
| | Messaging Reliability | 3 | Idempotent Receiver, Inbox, Outbox | | ||
| | Structural | 7 | Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy | | ||
|
|
| ```powershell | ||
| dotnet run -c Release --project benchmarks/PatternKit.Benchmarks -- --artifacts artifacts/benchmarks | ||
| dotnet run -c Release --framework net10.0 --project benchmarks/PatternKit.Benchmarks -- --artifacts artifacts/benchmarks --join | ||
| ``` | ||
|
|
||
| Run a single pattern: | ||
|
|
||
| ```powershell | ||
| dotnet run -c Release --project benchmarks/PatternKit.Benchmarks -- --filter *SchedulerAgentSupervisor* --artifacts artifacts/benchmarks | ||
| dotnet run -c Release --framework net10.0 --project benchmarks/PatternKit.Benchmarks -- --filter *SchedulerAgentSupervisor* --artifacts artifacts/benchmarks --join | ||
| ``` |
| ```powershell | ||
| dotnet run -c Release --project benchmarks/PatternKit.Benchmarks -- --artifacts artifacts/benchmarks | ||
| dotnet run -c Release --framework net10.0 --project benchmarks/PatternKit.Benchmarks -- --artifacts artifacts/benchmarks --join | ||
| ``` | ||
|
|
||
| Run one pattern family: | ||
|
|
||
| ```powershell | ||
| dotnet run -c Release --project benchmarks/PatternKit.Benchmarks -- --filter *LeaderElection* --artifacts artifacts/benchmarks | ||
| dotnet run -c Release --framework net10.0 --project benchmarks/PatternKit.Benchmarks -- --filter *LeaderElection* --artifacts artifacts/benchmarks --join | ||
| ``` |
| @@ -11,7 +11,7 @@ | |||
| <NoWarn>$(NoWarn);1591</NoWarn> | |||
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #337 +/- ##
==========================================
+ Coverage 89.66% 95.65% +5.98%
==========================================
Files 486 486
Lines 40002 40002
Branches 5756 5756
==========================================
+ Hits 35868 38262 +2394
+ Misses 1875 1740 -135
+ Partials 2259 0 -2259
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:
|
🔍 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. |
Code Coverage |
Summary
Validation