-
Notifications
You must be signed in to change notification settings - Fork 0
V1.2.0/service update #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughBenchmark execution was consolidated: BenchmarkWorker was removed and its logic moved into a reworked BenchmarkProgram (now inheriting MinimalConsoleProgram), adding build-awareness, async RunAsync flow, report-based filtering helpers, and service wiring. Package versions and tests/benchmarks were updated or removed; a suppression file and a minor string Contains change were added. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant CLI as CLI (Console)
participant Program as BenchmarkProgram
participant Builder as Host Builder / DI
participant Workspace as BenchmarkWorkspace
participant FS as FileSystem/Reports
participant Runner as BenchmarkDotNet Runner
CLI->>Program: Start(args)
Program->>Builder: Build host (register BenchmarkContext, BenchmarkWorkspace)
Builder-->>Program: IServiceProvider
Program->>Workspace: LoadAssemblies(configuration, buildSegment, ...)
Workspace-->>Program: assemblies[]
alt Skip based on reports option
Program->>FS: Read existing reports (results/tuning paths)
FS-->>Program: report metadata
Program->>Program: ApplyReportFilters(assemblies, reports)
end
Program->>Runner: Execute benchmarks for filtered assemblies (async)
Runner-->>Program: results/artifacts
Program->>Workspace: PostProcessArtifacts(results)
Program-->>CLI: Exit(status)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this 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 refactors the benchmark console runner by consolidating the BenchmarkWorker class into BenchmarkProgram, which now directly inherits from MinimalConsoleProgram<BenchmarkProgram> instead of ConsoleProgram<BenchmarkWorker>. The refactoring simplifies the codebase by reducing the number of classes and moving the benchmark execution logic directly into the program class.
Key changes:
- Removed the
BenchmarkWorkerclass and moved its functionality intoBenchmarkProgramwith improved method organization - Updated inheritance from
ConsoleProgram<BenchmarkWorker>toMinimalConsoleProgram<BenchmarkProgram> - Enhanced code maintainability by extracting helper methods for better separation of concerns
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.cs |
Deleted benchmark file for the removed BenchmarkWorker class |
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkWorkerTest.cs |
Deleted test file for the removed BenchmarkWorker class |
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs |
Updated assertions to reflect new inheritance structure and generic type parameter |
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs |
Deleted worker class; functionality moved to BenchmarkProgram |
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs |
Added RunAsync method and helper methods; changed inheritance to MinimalConsoleProgram<BenchmarkProgram> |
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs |
Modernized string comparison using Contains instead of IndexOf |
src/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cs |
Added code analysis suppression for abstraction usage in public API |
Directory.Packages.props |
Updated package versions to latest releases |
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
Outdated
Show resolved
Hide resolved
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (1)
165-175: Type matching by simple name could cause false positives.
FindMatchingBenchmarkTypematches benchmark types solely by class name (e.g.,FooBenchmark), ignoring namespaces. If two assemblies contain benchmarks with the same class name in different namespaces, only one would be matched—potentially skipping the wrong benchmark or missing one entirely.Consider matching by full type name when the report filename contains namespace information:
🔎 Suggested improvement for more precise matching
private static Type FindMatchingBenchmarkType(string reportPath, List<Type> benchmarkTypes) { var filename = Path.GetFileNameWithoutExtension(reportPath); var potentialTypeFullName = filename.Split('-').FirstOrDefault(); if (string.IsNullOrWhiteSpace(potentialTypeFullName)) { return null; } - var potentialTypeName = potentialTypeFullName.Split('.').LastOrDefault(); - if (string.IsNullOrWhiteSpace(potentialTypeName)) { return null; } - - return benchmarkTypes.FirstOrDefault(t => t.Name.Equals(potentialTypeName, StringComparison.OrdinalIgnoreCase)); + // Try full name match first, fall back to simple name + return benchmarkTypes.FirstOrDefault(t => t.FullName?.Equals(potentialTypeFullName, StringComparison.OrdinalIgnoreCase) == true) + ?? benchmarkTypes.FirstOrDefault(t => t.Name.Equals(potentialTypeFullName.Split('.').LastOrDefault(), StringComparison.OrdinalIgnoreCase)); }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
Directory.Packages.props(1 hunks)src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs(2 hunks)src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs(0 hunks)src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs(1 hunks)src/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cs(1 hunks)test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs(2 hunks)test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkWorkerTest.cs(0 hunks)tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.cs(0 hunks)
💤 Files with no reviewable changes (3)
- tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.cs
- src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs
- test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkWorkerTest.cs
🧰 Additional context used
📓 Path-based instructions (2)
**/*Test.cs
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*Test.cs: Always inherit from theTestbase class for all unit test classes in Codebelt.Extensions.BenchmarkDotNet
Do NOT addusing Xunit.Abstractionsin test files; useCodebelt.Extensions.XunitTest base class andusing Xunit;instead
Use[Fact]for standard unit tests and[Theory]with[InlineData]or other data sources for parameterized tests
Use descriptive test method names that state the expected behavior (e.g.,ShouldReturnTrue_WhenConditionIsMet)
End test class names withTest(e.g.,DateSpanTest)
UseAssertmethods from xUnit for all assertions in unit tests
Test class namespaces MUST match the System Under Test (SUT) namespace exactly; do NOT append.Tests,.Benchmarks, or similar suffixes to the namespace
Files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs
**/*.cs
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Add XML doc comments to public and protected classes and methods in C# code where appropriate
Files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cssrc/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
🧠 Learnings (19)
📓 Common learnings
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*.csproj : Modify the associated .csproj file for benchmarks to override the root namespace so the compiled namespace matches the production assembly; example: `<RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Bar</RootNamespace>`
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[Benchmark]` on methods representing measured operations; consider `Baseline = true` and `Description` to improve report clarity
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Benchmark class namespaces must match the production assembly namespace; do NOT append `.Benchmarks` to the namespace
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: For shared helpers for benchmarking, prefer small utility classes inside the `tuning` projects rather than cross-cutting changes to production code
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)]` to group related benchmarks
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep benchmark configuration minimal and explicit; prefer in-class attributes over large shared configs unless re-used widely
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : When comparing benchmark implementations, mark one method with `Baseline = true` and use similar names so reports are easy to read
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Test.cs : Always inherit from the `Test` base class for all unit test classes in Codebelt.Extensions.BenchmarkDotNet
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.csDirectory.Packages.propssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Benchmark class namespaces must match the production assembly namespace; do NOT append `.Benchmarks` to the namespace
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cssrc/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*.csproj : Modify the associated .csproj file for benchmarks to override the root namespace so the compiled namespace matches the production assembly; example: `<RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Bar</RootNamespace>`
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cssrc/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.csDirectory.Packages.propssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[Benchmark]` on methods representing measured operations; consider `Baseline = true` and `Description` to improve report clarity
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Test.cs : Do NOT add `using Xunit.Abstractions` in test files; use `Codebelt.Extensions.Xunit` Test base class and `using Xunit;` instead
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.csDirectory.Packages.propssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Benchmark class names must end with `Benchmark` (e.g., `SampleOperationBenchmark`)
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : When comparing benchmark implementations, mark one method with `Baseline = true` and use similar names so reports are easy to read
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)]` to group related benchmarks
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Test.cs : Use `Assert` methods from xUnit for all assertions in unit tests
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*.csproj : Modify the associated .csproj file to override the root namespace so the compiled namespace matches the SUT; example: `<RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Foo</RootNamespace>`
Applied to files:
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.csDirectory.Packages.propssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep benchmark projects isolated (e.g., `tuning/*.csproj`) so they don't affect package builds or production artifacts
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.csDirectory.Packages.propssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Place micro- and component-benchmarks under the `tuning/` folder or in projects named `*.Benchmarks`
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[GlobalSetup]` for one-time initialization in benchmarks that is not part of measured work
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[MemoryDiagnoser]` attribute to capture memory allocations in benchmarks
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Use the same documentation style as found throughout the Codebelt.Extensions.BenchmarkDotNet codebase for XML documentation
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.csDirectory.Packages.propssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Do not use `InternalsVisibleTo` to access internal types or members from test projects; prefer indirect testing via public APIs
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep tests focused and isolated; do not rely on external systems except for xUnit itself and Codebelt.Extensions.Xunit
Applied to files:
Directory.Packages.propssrc/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Benchmarks are primarily for local and tuning runs; be cautious about running heavy BenchmarkDotNet workloads in CI
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
🧬 Code graph analysis (1)
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs (1)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (2)
BenchmarkProgram(23-193)BenchmarkProgram(25-30)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: call-test (windows-2025, Release) / 🧪 Test
- GitHub Check: call-test (windows-11-arm, Release) / 🧪 Test
- GitHub Check: call-test (ubuntu-24.04, Release) / 🧪 Test
- GitHub Check: call-test (windows-11-arm, Debug) / 🧪 Test
- GitHub Check: call-test (windows-2025, Debug) / 🧪 Test
- GitHub Check: call-test (ubuntu-24.04-arm, Release) / 🧪 Test
- GitHub Check: call-pack (Release) / 📦 Pack
- GitHub Check: call-test (ubuntu-24.04, Debug) / 🧪 Test
- GitHub Check: call-test (ubuntu-24.04-arm, Debug) / 🧪 Test
- GitHub Check: CodeQL analysis (csharp)
- GitHub Check: Agent
🔇 Additional comments (10)
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs (1)
122-124: LGTM - cleaner string matching.The switch from
IndexOf(...) >= 0toContains(...)is more idiomatic and readable while maintaining identical behavior.test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs (2)
242-254: Test correctly updated to reflect new inheritance.The assertion now verifies
BenchmarkPrograminherits fromMinimalConsoleProgram<T>instead of the removedConsoleProgram<T>, matching the production code changes.
256-269: Generic type parameter assertion correctly updated.The test now verifies that
BenchmarkProgramuses itself as the generic type argument (CRTP pattern), consistent with the refactoredMinimalConsoleProgram<BenchmarkProgram>inheritance.src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (5)
1-4: New imports appropriately added for BenchmarkDotNet integration.The added using directives support the new
RunAsyncimplementation withBenchmarkRunner,BenchmarkSwitcher,SimpleFilter, and async/IO operations.Also applies to: 10-15
25-42: Static initialization is well-designed.The static constructor safely handles the case where
GetEntryAssembly()returns null by falling back toGetExecutingAssembly(). Both properties are correctly initialized once and exposed as read-only.
95-106: Service configuration and host building pattern looks correct.The builder pattern properly configures:
ConsoleLifetimeOptionsto suppress status messages in Release buildsBenchmarkContextas singleton with command-line args- Custom workspace implementation via
AddBenchmarkWorkspace<TWorkspace>
118-137: Solid async entry point with proper cleanup.The
try/finallypattern ensuresPostProcessArtifacts()runs regardless of benchmark outcome. Note thatcancellationTokenis unused—BenchmarkDotNet's synchronous API doesn't support cancellation, so this is acceptable.
177-192: Benchmark execution logic is clean and correct.The conditional approach appropriately uses:
BenchmarkRunner.Runfor automated full runs (no args)BenchmarkSwitcherfor interactive/selective runs (with args)src/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cs (1)
8-8: Verify suppression target—LoadAssemblies is private.The suppression targets
BenchmarkWorkspace.LoadAssemblies, but this method is declared asprivate static(line 108). CA1859 applies to public API return types, so this private method shouldn't trigger the rule. The public methodLoadBenchmarkAssemblies()already returns the concrete typeAssembly[](line 86), not an enumerable. The suppression appears unnecessary or incorrectly targeted.Directory.Packages.props (1)
8-9: Package version bumps are appropriate.Both are patch-level updates. The
Codebelt.Bootstrapper.Console5.0.2 update aligns with the newMinimalConsoleProgram<T>base class used inBenchmarkProgram.
…am.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…am.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3 +/- ##
==========================================
- Coverage 73.92% 66.95% -6.97%
==========================================
Files 7 6 -1
Lines 349 345 -4
Branches 41 42 +1
==========================================
- Hits 258 231 -27
- Misses 91 114 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (1)
125-125: Consider braces for single-line if statement.While functionally correct, adding braces improves consistency and reduces the risk of future errors when the conditional body is expanded.
🔎 Proposed refactor
-if (options.SkipBenchmarksWithReports) { ConfigureBenchmarkDotNetFiltersForExistingReports(options, assemblies); } +if (options.SkipBenchmarksWithReports) +{ + ConfigureBenchmarkDotNetFiltersForExistingReports(options, assemblies); +}
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.cs
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Add XML doc comments to public and protected classes and methods in C# code where appropriate
Files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*.csproj : Modify the associated .csproj file for benchmarks to override the root namespace so the compiled namespace matches the production assembly; example: `<RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Bar</RootNamespace>`
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[Benchmark]` on methods representing measured operations; consider `Baseline = true` and `Description` to improve report clarity
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: For shared helpers for benchmarking, prefer small utility classes inside the `tuning` projects rather than cross-cutting changes to production code
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : When comparing benchmark implementations, mark one method with `Baseline = true` and use similar names so reports are easy to read
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Benchmark class namespaces must match the production assembly namespace; do NOT append `.Benchmarks` to the namespace
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep benchmark projects isolated (e.g., `tuning/*.csproj`) so they don't affect package builds or production artifacts
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)]` to group related benchmarks
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Benchmarks are primarily for local and tuning runs; be cautious about running heavy BenchmarkDotNet workloads in CI
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep benchmark configuration minimal and explicit; prefer in-class attributes over large shared configs unless re-used widely
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep benchmarks focused: each `Benchmark` method should measure a single logical operation
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[Benchmark]` on methods representing measured operations; consider `Baseline = true` and `Description` to improve report clarity
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*.csproj : Modify the associated .csproj file for benchmarks to override the root namespace so the compiled namespace matches the production assembly; example: `<RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Bar</RootNamespace>`
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Test.cs : Always inherit from the `Test` base class for all unit test classes in Codebelt.Extensions.BenchmarkDotNet
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Benchmark class namespaces must match the production assembly namespace; do NOT append `.Benchmarks` to the namespace
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : When comparing benchmark implementations, mark one method with `Baseline = true` and use similar names so reports are easy to read
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[GlobalSetup]` for one-time initialization in benchmarks that is not part of measured work
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)]` to group related benchmarks
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*.csproj : Modify the associated .csproj file to override the root namespace so the compiled namespace matches the SUT; example: `<RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Foo</RootNamespace>`
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep benchmark projects isolated (e.g., `tuning/*.csproj`) so they don't affect package builds or production artifacts
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Benchmarks are primarily for local and tuning runs; be cautious about running heavy BenchmarkDotNet workloads in CI
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Use the same documentation style as found throughout the Codebelt.Extensions.BenchmarkDotNet codebase for XML documentation
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Benchmark class names must end with `Benchmark` (e.g., `SampleOperationBenchmark`)
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep tests focused and isolated; do not rely on external systems except for xUnit itself and Codebelt.Extensions.Xunit
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[MemoryDiagnoser]` attribute to capture memory allocations in benchmarks
Applied to files:
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs
🧬 Code graph analysis (1)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (4)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkContext.cs (2)
BenchmarkContext(6-22)BenchmarkContext(12-15)src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptions.cs (2)
BenchmarkWorkspaceOptions(64-321)BenchmarkWorkspaceOptions(98-106)src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptionsExtensions.cs (1)
BenchmarkWorkspaceOptions(65-76)src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs (5)
PostProcessArtifacts(103-106)Assembly(86-95)BenchmarkWorkspace(17-225)BenchmarkWorkspace(62-71)GetReportsTuningPath(46-50)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: call-test (windows-2025, Debug) / 🧪 Test
- GitHub Check: call-test (windows-11-arm, Debug) / 🧪 Test
- GitHub Check: call-test (windows-11-arm, Release) / 🧪 Test
🔇 Additional comments (8)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (8)
1-16: LGTM: Using directives support the refactored execution flow.The new using directives appropriately support the consolidated benchmark execution logic and filtering features.
25-42: LGTM: Build metadata initialization is clear and well-documented.The static constructor correctly determines the build configuration, and the public properties are appropriately documented.
44-106: LGTM: Run method overloads provide flexible configuration options.The overload pattern is well-designed, and the host builder configuration correctly integrates BenchmarkContext, BenchmarkWorkspace, and ConsoleLifetimeOptions based on build configuration.
108-137: LGTM: RunAsync orchestrates execution with proper cleanup.The try-finally ensures artifact post-processing always occurs, and the overall flow correctly loads assemblies, applies optional filters, and executes benchmarks.
139-146: LGTM: Type discovery follows BenchmarkDotNet naming conventions.The method correctly identifies potential benchmark types by name suffix, consistent with BenchmarkDotNet's discovery patterns.
177-192: LGTM: Benchmark execution correctly uses BenchmarkRunner or BenchmarkSwitcher based on arguments.The method appropriately delegates to BenchmarkDotNet's execution APIs, running all benchmarks when no arguments are provided or using the switcher for selective execution with arguments.
19-23: No changes needed.The seealso reference
MinimalConsoleProgram{BenchmarkProgram}follows the correct C# XML documentation syntax for generic types. Braces are the standard approach for referencing generics in cref attributes. The backtick notation is only for compiler-generated metadata, not source code.Likely an incorrect or invalid review comment.
148-175: The code uses established K&R style with single-line if statements containing braces on the same line (line 151:if (!Directory.Exists(tuningPath)) { return config; }), consistent with the codebase pattern at lines 125, 169, and 172. No refactoring is needed. TheFindMatchingBenchmarkTypemethod correctly applies BenchmarkDotNet's documented stable report filename format of<BenchmarkName>-<suffix>.<ext>, and appropriately returns null when parsing fails.Likely an incorrect or invalid review comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt(1 hunks).nuget/Codebelt.Extensions.BenchmarkDotNet/PackageReleaseNotes.txt(1 hunks)CHANGELOG.md(1 hunks)reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkWorkerBenchmark-report-github.md(0 hunks)
💤 Files with no reviewable changes (1)
- reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkWorkerBenchmark-report-github.md
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*.csproj : Modify the associated .csproj file for benchmarks to override the root namespace so the compiled namespace matches the production assembly; example: `<RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Bar</RootNamespace>`
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[Benchmark]` on methods representing measured operations; consider `Baseline = true` and `Description` to improve report clarity
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: For shared helpers for benchmarking, prefer small utility classes inside the `tuning` projects rather than cross-cutting changes to production code
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : When comparing benchmark implementations, mark one method with `Baseline = true` and use similar names so reports are easy to read
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Benchmark class namespaces must match the production assembly namespace; do NOT append `.Benchmarks` to the namespace
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep benchmark projects isolated (e.g., `tuning/*.csproj`) so they don't affect package builds or production artifacts
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Benchmarks are primarily for local and tuning runs; be cautious about running heavy BenchmarkDotNet workloads in CI
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory)]` to group related benchmarks
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep benchmarks focused: each `Benchmark` method should measure a single logical operation
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Keep benchmark configuration minimal and explicit; prefer in-class attributes over large shared configs unless re-used widely
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Use the same documentation style as found throughout the Codebelt.Extensions.BenchmarkDotNet codebase for XML documentation
Applied to files:
.nuget/Codebelt.Extensions.BenchmarkDotNet/PackageReleaseNotes.txtCHANGELOG.md.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*.csproj : Modify the associated .csproj file for benchmarks to override the root namespace so the compiled namespace matches the production assembly; example: `<RootNamespace>Codebelt.Extensions.BenchmarkDotNet.Bar</RootNamespace>`
Applied to files:
.nuget/Codebelt.Extensions.BenchmarkDotNet/PackageReleaseNotes.txtCHANGELOG.md.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Use `[Benchmark]` on methods representing measured operations; consider `Baseline = true` and `Description` to improve report clarity
Applied to files:
CHANGELOG.md.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: If a benchmark exposes regressions or optimizations, add a short note in the benchmark file referencing the relevant issue or PR
Applied to files:
CHANGELOG.md
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : Benchmark class namespaces must match the production assembly namespace; do NOT append `.Benchmarks` to the namespace
Applied to files:
CHANGELOG.md.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Test.cs : Always inherit from the `Test` base class for all unit test classes in Codebelt.Extensions.BenchmarkDotNet
Applied to files:
.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Benchmarks are primarily for local and tuning runs; be cautious about running heavy BenchmarkDotNet workloads in CI
Applied to files:
.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt
📚 Learning: 2025-12-14T19:07:05.899Z
Learnt from: CR
Repo: codebeltnet/benchmarkdotnet PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-14T19:07:05.899Z
Learning: Applies to **/*Benchmark.cs : When comparing benchmark implementations, mark one method with `Baseline = true` and use similar names so reports are easy to read
Applied to files:
.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: call-test (windows-2025, Debug) / 🧪 Test
- GitHub Check: call-test (windows-11-arm, Debug) / 🧪 Test
- GitHub Check: call-test (ubuntu-24.04-arm, Release) / 🧪 Test
- GitHub Check: call-test (ubuntu-24.04-arm, Debug) / 🧪 Test
- GitHub Check: call-test (windows-2025, Release) / 🧪 Test
- GitHub Check: call-test (windows-11-arm, Release) / 🧪 Test
🔇 Additional comments (4)
.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt (1)
1-9: Release notes clearly document the 1.2.0 changes.The addition of version 1.2.0 accurately reflects the removal of
BenchmarkWorkerand consolidation intoBenchmarkProgram. The "Breaking Changes" section is appropriately used, and the description clearly communicates what was removed and where the responsibility was transferred.CHANGELOG.md (2)
7-13: CHANGELOG clearly documents 1.2.0 with transparent rationale.The new 1.2.0 entry accurately captures the removal of
BenchmarkWorkerand explains the versioning decision. The note that this is technically a major release but labeled minor—because the external API remains unchanged and the library is new—is transparent and reasonable for the stated scope.
15-25: 1.1.0 section correctly documents prior enhancements.The 1.1.0 "### Changed" section appropriately captures the extensions to
BenchmarkWorkspace,BenchmarkWorkspaceOptions,BenchmarkProgram, andBenchmarkWorkerthat laid the groundwork for the consolidation in 1.2.0. The progression is logical and well-documented..nuget/Codebelt.Extensions.BenchmarkDotNet/PackageReleaseNotes.txt (1)
1-5: Release notes incomplete with duplicate content from v1.1.0.The Version 1.2.0 notes contain an identical ALM entry to v1.1.0 ("Dependencies have been upgraded..."). Additionally, v1.2.0 lacks the "Bug Fixes" and "Improvements" sections present in v1.1.0, suggesting either minimal changes or incomplete documentation. Add a "Breaking Changes" section if applicable and clarify what functional changes, bug fixes, or improvements are included in this release beyond the dependency upgrades.
| Availability: .NET 10 and .NET 9 | ||
|
|
||
| # ALM | ||
| - CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate ALM entry between versions 1.2.0 and 1.1.0.
Both Version 1.2.0 (line 5) and Version 1.1.0 (line 11) contain identical wording: "Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)". Clarify whether:
- This is a copy-paste error in 1.1.0's notes
- Both versions genuinely have the same dependency change (and if so, whether 1.2.0's notes should be more specific)
- The 1.1.0 notes need historical correction
Also applies to: 11-11
🤖 Prompt for AI Agents
In .nuget/Codebelt.Extensions.BenchmarkDotNet/PackageReleaseNotes.txt around
lines 5 and 11, there is a duplicate ALM entry ("Dependencies have been upgraded
to the latest compatible versions for all supported target frameworks (TFMs)")
present in both Version 1.2.0 (line 5) and Version 1.1.0 (line 11); determine
which version actually introduced that dependency change and then either remove
or rewrite the duplicate: if 1.2.0 is the correct entry, remove or replace the
1.1.0 sentence with a concise historical correction (e.g., accurate change text
or "no dependency updates"), or if 1.1.0 was correct, make 1.2.0 more specific
about what changed (package names/versions or scope) so the notes are not
identical; commit the updated PackageReleaseNotes.txt reflecting the chosen
clarification.
|



This pull request refactors the benchmark console runner implementation to simplify the codebase and improve maintainability. The main change is the removal of the
BenchmarkWorkerclass, consolidating its logic into the newBenchmarkProgramclass, which now directly inherits fromMinimalConsoleProgram<BenchmarkProgram>. Associated tests and benchmarks have been updated to reflect these structural changes. Package dependencies and minor code details have also been updated.Refactor: Benchmark runner consolidation
BenchmarkWorkerclass and moved all benchmark execution logic intoBenchmarkProgram, which now inherits fromMinimalConsoleProgram<BenchmarkProgram>instead ofConsoleProgram<BenchmarkWorker>. This includes service configuration and benchmark execution routines. (src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs[1]src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs[2] [3]BenchmarkProgram. (test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs[1] [2]BenchmarkWorkerBenchmarkperformance benchmark sinceBenchmarkWorkerno longer exists. (tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.cstuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.csL1-L92)Dependency and code improvements
Codebelt.Bootstrapper.ConsoleandCodebelt.Extensions.Xunit.Appto the latest releases. (Directory.Packages.propsDirectory.Packages.propsL8-R9)BenchmarkWorkspaceto usestring.Containsfor path matching, increasing reliability. (src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cssrc/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.csL124-R124)src/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.cssrc/Codebelt.Extensions.BenchmarkDotNet/GlobalSuppressions.csR1-R8)Summary by CodeRabbit
Chores
Refactor
Tests
Style
✏️ Tip: You can customize this high-level summary in your review settings.