Skip to content

Conversation

@gimlichael
Copy link
Member

@gimlichael gimlichael commented Dec 11, 2025

This pull request completes a comprehensive rebranding and restructuring of the repository from "ClassLibrary1" to "Codebelt.Extensions.BenchmarkDotNet." It updates all documentation, configuration, and project structure to reflect the new name and introduces improved, detailed guidelines for writing performance benchmarks. The solution and CI/CD pipeline have also been updated to match the new naming and organization conventions.

Key changes include:

Repository and Solution Renaming:

  • Replaces all references to "ClassLibrary1" with "Codebelt.Extensions.BenchmarkDotNet" across documentation, code samples, namespaces, and configuration files, ensuring consistency throughout the codebase. (.github/copilot-instructions.md, Directory.Build.props, .github/workflows/ci-pipeline.yml) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

  • Removes the old solution file ClassLibrary1.sln and replaces it with a new solution structure file Codebelt.Extensions.BenchmarkDotNet.slnx, organizing projects into /src/, /test/, /tooling/, and /tuning/ folders. [1] [2]

Documentation and Guidelines Updates:

  • Updates unit test and performance test guidelines to use the new naming, namespaces, and folder structure, providing clear examples for Codebelt.Extensions.BenchmarkDotNet. (.github/copilot-instructions.md) [1] [2] [3] [4] [5] [6]

  • Adds a comprehensive new prompt for Copilot on how to generate BenchmarkDotNet performance benchmarks, including naming, placement, best practices, and example fixtures. (.github/prompts/benchmark.prompt.md)

CI/CD and Build Configuration:

  • Updates the GitHub Actions workflow to use the new project name, secrets, and repository references, and adapts signing key and project keys for the renamed solution. (.github/workflows/ci-pipeline.yml) [1] [2] [3] [4]

  • Adjusts build properties and paths in Directory.Build.props to align with the new structure and naming conventions. [1] [2]

Cleanup of Legacy Artifacts:

  • Removes legacy documentation and release notes for "ClassLibrary1" to prevent confusion and ensure only current, relevant information is present. (.nuget/ClassLibrary1/PackageReleaseNotes.txt, .nuget/ClassLibrary1/README.md) [1] [2]
  • Deletes the obsolete solution file ClassLibrary1.sln.

These updates lay the foundation for future development under the new Codebelt.Extensions.BenchmarkDotNet name, with improved organization, clearer guidelines, and modernized CI/CD processes.

Summary by CodeRabbit

  • New Features

    • Console-hosted runner and worker for running BenchmarkDotNet workloads
    • Workspace and DI integration to discover, run, and post-process benchmarks
    • Public APIs and fluent helpers for configuring benchmark workspaces
  • Updates

    • Rebranded docs, README and metadata to "Extensions for BenchmarkDotNet by Codebelt"
    • Target frameworks updated to .NET 10 and .NET 9; package versions updated
  • Documentation

    • Updated changelog, package READMEs and docs site
  • Tests & Benchmarks

    • Extensive unit tests, tuning benchmarks and generated benchmark reports added

✏️ Tip: You can customize this high-level summary in your review settings.

@gimlichael gimlichael self-assigned this Dec 11, 2025
Copilot AI review requested due to automatic review settings December 11, 2025 20:49
Copy link

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 completes a comprehensive rebranding and restructuring of the repository from "ClassLibrary1" to "Codebelt.Extensions.BenchmarkDotNet." The changes introduce a new BenchmarkDotNet extension library with supporting infrastructure for running performance benchmarks, including workspace management, dependency injection integration, and console hosting capabilities.

Key Changes:

  • Complete repository rebranding from ClassLibrary1 to Codebelt.Extensions.BenchmarkDotNet across all documentation, configuration, and code
  • Introduction of new BenchmarkDotNet extension libraries with workspace management, DI integration, and console hosting
  • Addition of comprehensive unit tests and performance benchmarks following established conventions
  • Updated CI/CD pipeline configuration with corrected build settings and package version upgrades

Reviewed changes

Copilot reviewed 46 out of 47 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
Codebelt.Extensions.BenchmarkDotNet.slnx New solution structure file organizing projects into /src/, /test/, /tooling/, and /tuning/ folders
ClassLibrary1.sln Legacy solution file removed
Directory.Build.props Updated with new branding, multi-TFM support (net9.0, net10.0), and benchmark project configuration
Directory.Build.targets Added CleanBenchmarkOutput target and reorganized package release notes configuration
Directory.Packages.props Updated package versions including BenchmarkDotNet 0.15.8, new dependencies
.github/workflows/ci-pipeline.yml Renamed pipeline, updated secrets/keys, corrected organization references
.github/copilot-instructions.md Updated coding guidelines with new namespace conventions for Codebelt.Extensions.BenchmarkDotNet
.github/prompts/benchmark.prompt.md New comprehensive benchmark generation guidelines
src/Codebelt.Extensions.BenchmarkDotNet/* Core library with workspace management, options, and DI extensions
src/Codebelt.Extensions.BenchmarkDotNet.Console/* Console hosting components including BenchmarkProgram, BenchmarkWorker, and BenchmarkContext
test/Codebelt.Extensions.BenchmarkDotNet.Tests/* Comprehensive unit tests following Test base class pattern
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/* Console component unit tests with proper namespace alignment
tuning/Codebelt.Extensions.BenchmarkDotNet.Benchmarks/* Performance benchmarks following BenchmarkDotNet conventions
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/* Console component benchmarks
tooling/Codebelt.Extensions.BenchmarkDotNet.Runner/* Benchmark runner executable
Legacy ClassLibrary1 files All removed including src, test projects, and .nuget documentation

@coderabbitai
Copy link

coderabbitai bot commented Dec 11, 2025

Note

Other AI code review bot(s) detected

CodeRabbit 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.

Walkthrough

Rebrands repository to Codebelt.Extensions.BenchmarkDotNet: removes ClassLibrary1, adds new solution/projects (core library, console host, runner, tuning benchmarks), introduces BenchmarkDotNet workspace/options/worker/program types, extensive tests, benchmark reports, updated CI/docfx/build metadata and packaging metadata.

Changes

Cohort / File(s) Change Summary
DocFX & documentation
.docfx/*, .docfx/docfx.json, .docfx/index.md, .docfx/packages/index.md, .docfx/toc.yml, .docfx/api/..., .docfx/includes/*
Replaced ClassLibrary1 docs with Codebelt.Extensions.BenchmarkDotNet content; updated docfx project globs and target TFMs, xref maps, global metadata, availability includes; added/removed API pages; updated docfx build/publish image tags and registry.
DocFX build scripts
.docfx/BuildDocfxImage.ps1, .docfx/PublishDocfxImage.ps1
Updated Docker image tags and push registry paths used for building/publishing docfx images.
Build scripts & CI
.github/workflows/ci-pipeline.yml, Directory.Build.props, Directory.Build.targets, Directory.Packages.props
Renamed CI workflow, updated strong-name key, added workflow_dispatch, adjusted matrix and Sonar/Codecov settings; centralized package and target framework metadata; added/changed build targets (CleanBenchmarkOutput, ApplyFileVersion, release-notes handling) and package version updates.
Solution & projects
ClassLibrary1.sln (deleted), Codebelt.Extensions.BenchmarkDotNet.slnx, src/*/*.csproj, tooling/*/*.csproj, tuning/*/*.csproj
Removed legacy solution/project; added new solution and many projects: core library, console host, runner tooling, tuning benchmark projects and test projects with corresponding references and package dependencies.
Core library API
src/Codebelt.Extensions.BenchmarkDotNet/*
(e.g., BenchmarkWorkspace.cs, BenchmarkWorkspaceOptions.cs, IBenchmarkWorkspace.cs, ServiceCollectionExtensions.cs, BenchmarkWorkspaceOptionsExtensions.cs)
Added IBenchmarkWorkspace interface, BenchmarkWorkspace implementation (assembly discovery, artifact post-processing, assembly-resolve), BenchmarkWorkspaceOptions (defaults, ManualConfig composition, validation), configuration extension and IServiceCollection registration helpers.
Console hosting
src/Codebelt.Extensions.BenchmarkDotNet.Console/*
(e.g., BenchmarkProgram.cs, BenchmarkWorker.cs, BenchmarkContext.cs)
Added BenchmarkProgram (ConsoleProgram entry, static build flags, Run overloads), BenchmarkWorker (hosted execution integrating BenchmarkDotNet, DI setup, RunAsync), and BenchmarkContext (argv holder).
Benchmarks & reports
tuning/*, reports/tuning/*
Added multiple BenchmarkDotNet benchmark classes exercising workspace/options/program/worker/context and added generated Markdown reports under reports/tuning.
Tests
test/Codebelt.Extensions.BenchmarkDotNet*.Tests/*, test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/*
Added extensive unit/integration tests for BenchmarkWorkspace, BenchmarkWorkspaceOptions, BenchmarkProgram, BenchmarkWorker, BenchmarkContext, ServiceCollectionExtensions, plus new test projects and test assets.
Package metadata & changelog
.nuget/Codebelt.Extensions.BenchmarkDotNet*/*, .nuget/ClassLibrary1/* (deleted), CHANGELOG.md, README.md
Added new package README/release notes for Codebelt packages, removed legacy ClassLibrary1 artifacts, updated CHANGELOG to 1.0.0, and rebranded README, badges and repository links.
Removed legacy code & tests
src/ClassLibrary1/*, test/TestProject1*/*
Deleted old ClassLibrary1 source files, csproj, solution entries and associated legacy test projects/files.
Misc config
testenvironments.json, .github/* prompts/instructions
Bumped test Docker image tag; updated GitHub copilot instructions and added a benchmark prompt guideline document.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant CLI as Client/CLI
    participant Program as BenchmarkProgram
    participant Host as HostBuilder
    participant DI as DI Container
    participant Worker as BenchmarkWorker
    participant Workspace as IBenchmarkWorkspace
    participant BDN as BenchmarkDotNet

    CLI->>Program: Run(args, optional setup)
    Program->>Host: CreateHostBuilder(args)
    Host->>DI: Register BenchmarkContext, BenchmarkWorkspaceOptions
    alt setup provided
        Host->>DI: Apply setup(options)
    end
    Host->>DI: Register IBenchmarkWorkspace (default/custom)
    Program->>Host: Build() & Run()
    Host->>Worker: Instantiate via DI
    Worker->>Workspace: LoadBenchmarkAssemblies()
    Workspace-->>Worker: Assembly[]
    alt no args
        Worker->>BDN: BenchmarkRunner.Run(assemblies, config)
    else args present
        Worker->>BDN: BenchmarkSwitcher.Run(args, config)
    end
    BDN-->>Worker: Results
    Worker->>Workspace: PostProcessArtifacts()
    Workspace-->>Worker: Done
    Worker-->>Host: Exit
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

  • Pay special attention to:
    • src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs — assembly discovery, AssemblyResolve handler, concurrency and file I/O.
    • src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptions.cs — repo discovery, ManualConfig composition, PostConfigureOptions and validation.
    • src/Codebelt.Extensions.BenchmarkDotNet.Console/{BenchmarkProgram,BenchmarkWorker}.cs — host/DI wiring, lifecycle, Run/RunAsync control flow and argument handling.
    • New tests that interact with filesystem/assemblies — ensure isolation and cleanup.
    • Directory.Build.targets/props and versioning targets — ApplyFileVersion and release-notes processing.

Poem

🐇
I hopped from ClassLibrary to fields brand-new,
I gathered assemblies, one, two, and three,
I hosted runners, options true,
Benchmarks hum and reports sprout free — hooray, a crunchy carrot for me! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 8.87% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: a rebranding to BenchmarkDotNet API with version 1.0.0, though it uses version numbering in the branch format rather than standard PR title conventions.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch v1.0.0/benchmarkdotnet-api

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

♻️ Duplicate comments (9)
.github/workflows/ci-pipeline.yml (2)

64-64: Fix the spelling error in the SonarCloud project key.

The project key "bemchmarkdotnet" contains a spelling error and will prevent SonarCloud integration from functioning correctly. It should be "benchmarkdotnet" (with 'n' before 'c').

-      projectKey: bemchmarkdotnet
+      projectKey: benchmarkdotnet

73-73: Fix the spelling error in the Codecov repository path.

The repository identifier "bemchmarkdotnet" contains a spelling error and will prevent Codecov integration from functioning correctly. It should be "benchmarkdotnet" (with 'n' before 'c').

-      repository: codebeltnet/bemchmarkdotnet
+      repository: codebeltnet/benchmarkdotnet
src/Codebelt.Extensions.BenchmarkDotNet.Console/Codebelt.Extensions.BenchmarkDotNet.Console.csproj (1)

9-9: Verify central package version management.

Similar to the core project, this PackageReference lacks an explicit Version attribute. Ensure versions are managed centrally to avoid unpredictable dependency resolution.

src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs (1)

193-196: Use atomic file move with overwrite.

The current File.Delete followed by File.Move pattern risks data loss if the move fails after deletion. Use File.Move with the overwrite parameter for atomic replacement.

-            File.Delete(targetFile);
-            File.Move(file, targetFile);
+            File.Move(file, targetFile, overwrite: true);
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.cs (2)

21-21: Unused field _services.

The _services field is initialized in GlobalSetup but never accessed in any benchmark method. Either remove it or use it in a benchmark.

     private IConfiguration _configuration;
     private IHostEnvironment _environment;
     private BenchmarkWorker _worker;
-    private IServiceCollection _services;

61-68: Unused provider variable in ConfigureServicesWithOptions.

The provider variable is assigned but its value is never read. If the intent is to benchmark the cost of building a service provider, consider using GC.KeepAlive(provider) or returning a result to prevent the JIT from optimizing away the call.

 [Benchmark(Description = "Configure services with options")]
 public IServiceCollection ConfigureServicesWithOptions()
 {
     var services = new ServiceCollection();
     _worker.ConfigureServices(services);
     var provider = services.BuildServiceProvider();
+    GC.KeepAlive(provider);
     return services;
 }
tuning/Codebelt.Extensions.BenchmarkDotNet.Benchmarks/BenchmarkWorkspaceBenchmark.cs (1)

37-41: Unused variable v in benchmark.

The result of constructing BenchmarkWorkspace is assigned to v but never used. Use GC.KeepAlive to prevent JIT optimization, consistent with other benchmarks in this file.

 [Benchmark(Baseline = true, Description = "Construct BenchmarkDotNetWorkspace")]
 public void ConstructWorkspaceBenchmark()
 {
     var v = new BenchmarkWorkspace(new BenchmarkWorkspaceOptions());
+    GC.KeepAlive(v);
 }
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs (1)

136-138: Tautological assertion - always passes.

The expression isDebugBuild == true || isDebugBuild == false is always true for any boolean value. This assertion provides no meaningful verification.

Consider removing this line or replacing with a more meaningful assertion:

         // IsDebugBuild can be true or false, but should be set
         var isDebugBuild = BenchmarkProgram.IsDebugBuild;
-        Assert.True(isDebugBuild == true || isDebugBuild == false);
+        // Verify consistency with BuildConfiguration
+        Assert.Equal(BenchmarkProgram.BuildConfiguration == "Debug", isDebugBuild);
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkWorkerTest.cs (1)

340-350: Dispose CancellationTokenSource to avoid resource leak.

CancellationTokenSource implements IDisposable. Wrap it in a using statement.

         var services = CreateServiceProviderWithMocks();
-        var cts = new CancellationTokenSource();
-
-        // Act
-        var task = worker.RunAsync(services, cts.Token);
-
-        // Assert
-        await task;
-        Assert.True(task.IsCompletedSuccessfully);
-
-        TestOutput.WriteLine("RunAsync handled cancellation token");
+        using var cts = new CancellationTokenSource();
+
+        // Act
+        var task = worker.RunAsync(services, cts.Token);
+
+        // Assert
+        await task;
+        Assert.True(task.IsCompletedSuccessfully);
+
+        TestOutput.WriteLine("RunAsync handled cancellation token");
🧹 Nitpick comments (24)
.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/README.md (1)

11-11: Consider simplifying redundant phrase.

The phrase "evolve over time" is redundant. Consider shortening to "evolve" for clearer, more concise writing.

Apply this diff:

-By embracing `Microsoft.Extensions.Hosting`, this package enables clean separation between benchmark definition, configuration, and execution - making benchmarks easier to compose, test, and evolve over time.
+By embracing `Microsoft.Extensions.Hosting`, this package enables clean separation between benchmark definition, configuration, and execution - making benchmarks easier to compose, test, and evolve.
.docfx/toc.yml (1)

1-2: Verify "Bootstrapper API" naming choice.

The TOC entry uses "Bootstrapper API" but links to Codebelt.Extensions.BenchmarkDotNet.html. Consider whether "BenchmarkDotNet API" or "Extensions API" would be clearer for users navigating the documentation, as "Bootstrapper" might not be immediately intuitive.

Additionally, YAMLlint flags a newline character issue (expected \n). While this is a minor formatting concern, ensure the file uses consistent Unix-style line endings.

Directory.Build.targets (1)

18-20: Confirm scope of CleanBenchmarkOutput (removing entire $(OutputPath)).

Wiping the full $(OutputPath) before every build for benchmark projects is aggressive and can defeat incremental builds or remove non‑benchmark artifacts under that directory. If the intent is mainly to clear BenchmarkDotNet artifacts, you might narrow the scope to that subfolder (adjust path to match where BDN writes artifacts):

-  <Target Name="CleanBenchmarkOutput" BeforeTargets="BeforeBuild" Condition="'$(IsBenchmarkProject)' == 'true'">
-    <RemoveDir Directories="$(OutputPath)" />
-  </Target>
+  <Target Name="CleanBenchmarkOutput" BeforeTargets="BeforeBuild" Condition="'$(IsBenchmarkProject)' == 'true'">
+    <RemoveDir Directories="$(OutputPath)BenchmarkDotNet.Artifacts" />
+  </Target>

Or keep the current behavior if the full clean is desirable for your workflow.

reports/tuning/Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspaceBenchmark-report-github.md (1)

1-22: Tighten markdown formatting to satisfy linters (language + table spacing).

To address MD040/MD058 and keep reports clean, you can:

-```
+```text
@@
-```
-| Method                                                        | Runtime   | Mean       | Error      | StdDev     | Median     | Min        | Max        | Ratio  | RatioSD | Gen0   | Allocated | Alloc Ratio |
+```
+
+| Method                                                        | Runtime   | Mean       | Error      | StdDev     | Median     | Min        | Max        | Ratio  | RatioSD | Gen0   | Allocated | Alloc Ratio |
@@
-| '&#39;PostProcessArtifacts (move results -&gt; tuning folder)&#39;        | .NET 9.0  |  10.349 μs |  0.2326 μs |  0.2585 μs |  10.293 μs |   9.973 μs |  10.872 μs |   3.42 |    0.12 |      - |     392 B |        0.09 |
+| '&#39;PostProcessArtifacts (move results -&gt; tuning folder)&#39;        | .NET 9.0  |  10.349 μs |  0.2326 μs |  0.2585 μs |  10.293 μs |   9.973 μs |  10.872 μs |   3.42 |    0.12 |      - |     392 B |        0.09 |
+

(Blank lines before/after the table can be adjusted as needed, as long as the table is surrounded by at least one blank line.)

reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkProgramBenchmark-report-github.md (1)

1-28: Align this report’s markdown with lint rules (language + table spacing).

Mirroring the other report, consider:

-```
+```text
@@
-```
-| Method                                      | Runtime   | Mean          | Error       | StdDev      | Median        | Min           | Max           | Ratio     | RatioSD   | Gen0   | Allocated | Alloc Ratio |
+```
+
+| Method                                      | Runtime   | Mean          | Error       | StdDev      | Median        | Min           | Max           | Ratio     | RatioSD   | Gen0   | Allocated | Alloc Ratio |
@@
-| '&#39;Static property access pattern&#39;            | .NET 9.0  |     0.2924 ns |   0.0498 ns |   0.0466 ns |     0.2807 ns |     0.2035 ns |     0.3729 ns |         ? |         ? |      - |         - |           ? |
+| '&#39;Static property access pattern&#39;            | .NET 9.0  |     0.2924 ns |   0.0498 ns |   0.0466 ns |     0.2807 ns |     0.2035 ns |     0.3729 ns |         ? |         ? |      - |         - |           ? |
+

This keeps the content identical while satisfying MD040/MD058.

.nuget/Codebelt.Extensions.BenchmarkDotNet/README.md (1)

19-31: Make the C# example self-contained by adding usings for your namespaces.

To let consumers copy‑paste the snippet and compile immediately, consider including the relevant usings for your own APIs:

-using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Hosting;
-using System;
+using System;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Codebelt.Extensions.BenchmarkDotNet;
+using Codebelt.Extensions.BenchmarkDotNet.Console;

This makes BenchmarkContext and AddBenchmarkWorkspace resolve without extra discovery work.

.docfx/packages/index.md (1)

3-12: Minor wording tweak for subject/verb agreement.

In line 3, consider adjusting plural agreement:

-This is a list of all NuGet packages from **Extensions for BenchmarkDotNet by Codebelt** that is publicly available on ...
+This is a list of all NuGet packages from **Extensions for BenchmarkDotNet by Codebelt** that are publicly available on ...

Everything else in this section looks consistent with the new package naming.

.github/copilot-instructions.md (1)

1-249: Documentation updates look good.

The rebranding from ClassLibrary1 to Codebelt.Extensions.BenchmarkDotNet is consistent throughout. The namespace rules and guidelines for unit tests and benchmarks are clear and well-documented.

The static analysis hints flag minor markdown formatting issues (missing language specifiers for fenced code blocks on line 166, heading style inconsistencies). These are purely cosmetic and can be addressed optionally.

Apply these fixes if desired:

-  ```
+  ```csharp
   namespace Codebelt.Extensions.BenchmarkDotNet.Security.Cryptography
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptionsExtensions.cs (1)

18-24: Duplicate exception documentation.

The <exception> elements are documented twice (lines 18-24 and 58-64). Consider removing one set to avoid documentation drift.

         /// <exception cref="ArgumentNullException">
         /// <paramref name="options"/> cannot be null -or-
         /// <paramref name="configure"/> cannot be null.
         /// </exception>
         /// <exception cref="InvalidOperationException">
         /// <paramref name="configure"/> must not return null.
         /// </exception>
-        /// <remarks>
+        /// <remarks>
         /// <para>
         ...
         /// </para>
         /// </remarks>
-        /// <exception cref="ArgumentNullException">
-        /// <paramref name="options"/> cannot be null -or-
-        /// <paramref name="configure"/> cannot be null.
-        /// </exception>
-        /// <exception cref="InvalidOperationException">
-        /// <paramref name="configure"/> must not return null.
-        /// </exception>
         public static BenchmarkWorkspaceOptions ConfigureBenchmarkDotNet(...)

Also applies to: 58-64

README.md (1)

15-15: Wrap bare URL in angle brackets.

Per markdownlint MD034, bare URLs should be wrapped in angle brackets or converted to markdown links for consistent rendering across parsers.

-Full documentation (generated by [DocFx](https://github.com/dotnet/docfx)) located here: https://benchmarkdotnet.codebelt.net/
+Full documentation (generated by [DocFx](https://github.com/dotnet/docfx)) located here: <https://benchmarkdotnet.codebelt.net/>
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs (4)

82-82: Change return type to List<Assembly> for better performance.

Per CA1859, returning List<Assembly> instead of IEnumerable<Assembly> avoids the .ToArray() call at the call site and improves performance since the method already builds a list internally.

-    private static IEnumerable<Assembly> LoadAssemblies(string repositoryPath, string targetFrameworkMoniker, string benchmarkProjectSuffix, string repositoryTuningFolder, bool useDebugBuild)
+    private static List<Assembly> LoadAssemblies(string repositoryPath, string targetFrameworkMoniker, string benchmarkProjectSuffix, string repositoryTuningFolder, bool useDebugBuild)

Also update line 61-66 to avoid .ToArray():

-        return LoadAssemblies(
-            _options.RepositoryPath,
-            _options.TargetFrameworkMoniker,
-            _options.BenchmarkProjectSuffix,
-            _options.RepositoryTuningFolder,
-            useDebugBuild).ToArray();
+        return [.. LoadAssemblies(
+            _options.RepositoryPath,
+            _options.TargetFrameworkMoniker,
+            _options.BenchmarkProjectSuffix,
+            _options.RepositoryTuningFolder,
+            useDebugBuild)];

96-99: Use string.Contains for improved readability.

Per CA2249, string.Contains with StringComparison is more readable than IndexOf >= 0.

         var candidatePaths = Directory
             .EnumerateFiles(tuningDir, $"*.{benchmarkProjectSuffix}.dll", SearchOption.AllDirectories)
-            .Where(path => path.IndexOf(buildSegment, StringComparison.OrdinalIgnoreCase) >= 0);
+            .Where(path => path.Contains(buildSegment, StringComparison.OrdinalIgnoreCase));

121-124: Consider logging swallowed exceptions for diagnostics.

Swallowing exceptions during assembly loading is reasonable, but consider adding trace/debug logging to aid troubleshooting when assemblies fail to load unexpectedly.


191-191: Add StringComparison.OrdinalIgnoreCase to EndsWith.

Per CA1310, string.EndsWith without a StringComparison parameter can produce locale-dependent results. Use ordinal comparison for file extensions.

-        foreach (var file in Directory.GetFiles(reportsResultsPath).Where(s => !s.EndsWith(".lock")))
+        foreach (var file in Directory.GetFiles(reportsResultsPath).Where(s => !s.EndsWith(".lock", StringComparison.OrdinalIgnoreCase)))
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs (1)

49-78: CancellationToken is ignored during benchmark execution.

The cancellationToken parameter is received but never used. BenchmarkDotNet's BenchmarkRunner.Run and BenchmarkSwitcher.Run are synchronous and don't natively support cancellation, so this is understandable. However, consider documenting this limitation or at least checking for cancellation before starting each assembly run.

 public override Task RunAsync(IServiceProvider serviceProvider, CancellationToken cancellationToken)
 {
     var options = serviceProvider.GetRequiredService<BenchmarkWorkspaceOptions>();
     var workspace = serviceProvider.GetRequiredService<IBenchmarkWorkspace>();
     var assemblies = workspace.LoadBenchmarkAssemblies();
     var context = serviceProvider.GetRequiredService<BenchmarkContext>();

     try
     {
         if (context.Args.Length == 0)
         {
             foreach (var assembly in assemblies)
             {
+                cancellationToken.ThrowIfCancellationRequested();
                 BenchmarkRunner.Run(assembly, options.Configuration);
             }
         }
         else
         {
+            cancellationToken.ThrowIfCancellationRequested();
             BenchmarkSwitcher
                 .FromAssemblies(assemblies)
                 .Run(context.Args, options.Configuration);
         }
     }
     finally
     {
         workspace.PostProcessArtifacts();
     }

     return Task.CompletedTask;
 }
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.cs (1)

70-80: Trivial benchmarks may not yield meaningful measurements.

AccessConfiguration and AccessEnvironment only return pre-initialized fields, which essentially benchmarks field access time. If the intent is to measure property access overhead on the worker, consider accessing _worker.Configuration or similar properties instead (if they exist).

tuning/Codebelt.Extensions.BenchmarkDotNet.Benchmarks/BenchmarkWorkspaceBenchmark.cs (1)

17-35: Missing cleanup for temporary directory.

GlobalSetup creates a temporary directory at Path.GetTempPath() with a GUID-based name and copies files into it, but there's no GlobalCleanup method to remove these artifacts. This will leave orphaned directories after benchmark runs.

+[GlobalCleanup]
+public void GlobalCleanup()
+{
+    if (Directory.Exists(_workspace?.Options?.RepositoryPath))
+    {
+        Directory.Delete(_workspace.Options.RepositoryPath, recursive: true);
+    }
+}
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkContextBenchmark.cs (1)

68-73: Benchmark measures construction overhead, not just property access.

AccessArgsProperty creates a new BenchmarkContext in every iteration, so the measurement includes both construction and property access. If the intent is to isolate property access, move context creation to GlobalSetup and store it in a field.

+    private BenchmarkContext _contextForPropertyAccess;
+
     [GlobalSetup]
     public void Setup()
     {
         // Deterministic initialization of test data
         _emptyArgs = [];
         
         _smallArgs = new string[8];
         for (int i = 0; i < _smallArgs.Length; i++)
         {
             _smallArgs[i] = $"--arg{i}";
         }

         _mediumArgs = new string[64];
         for (int i = 0; i < _mediumArgs.Length; i++)
         {
             _mediumArgs[i] = $"--option{i}";
         }

         _largeArgs = new string[256];
         for (int i = 0; i < _largeArgs.Length; i++)
         {
             _largeArgs[i] = $"--parameter{i}=value{i}";
         }
+
+        _contextForPropertyAccess = new BenchmarkContext(_smallArgs);
     }

Then update the benchmark:

     [Benchmark(Description = "Access Args property")]
     public string[] AccessArgsProperty()
     {
-        var context = new BenchmarkContext(_smallArgs);
-        return context.Args;
+        return _contextForPropertyAccess.Args;
     }
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs (1)

144-163: Theory test silently skips non-matching cases.

This test runs two cases but only one will actually assert anything (the one matching the current build configuration). The other silently logs and passes without verifying anything.

Consider consolidating into a single Fact that always verifies the relationship:

-    [Theory]
-    [InlineData("Debug", true)]
-    [InlineData("Release", false)]
-    public void BuildConfiguration_ShouldMatchExpectedDebugState(string expectedConfig, bool expectedIsDebug)
+    [Fact]
+    public void BuildConfiguration_ShouldMatchExpectedDebugState()
     {
         // Act
         var actualConfig = BenchmarkProgram.BuildConfiguration;
         var actualIsDebug = BenchmarkProgram.IsDebugBuild;

         // Assert
-        if (actualConfig == expectedConfig)
-        {
-            Assert.Equal(expectedIsDebug, actualIsDebug);
-            TestOutput.WriteLine($"Configuration '{actualConfig}' correctly maps to IsDebugBuild={actualIsDebug}");
-        }
-        else
-        {
-            TestOutput.WriteLine($"Skipping assertion - actual configuration is '{actualConfig}', not '{expectedConfig}'");
-        }
+        var expectedIsDebug = actualConfig == "Debug";
+        Assert.Equal(expectedIsDebug, actualIsDebug);
+        TestOutput.WriteLine($"Configuration '{actualConfig}' correctly maps to IsDebugBuild={actualIsDebug}");
     }
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptions.cs (2)

90-90: Hardcoded Danish culture for summary formatting.

The DanishCulture is used for SummaryStyle formatting (Line 224). This affects decimal separators and number formatting in benchmark reports. Consider making this configurable or documenting why Danish culture was chosen.

If locale-specific formatting is intentional (e.g., for consistent report formatting), add a comment explaining the rationale. Otherwise, consider using CultureInfo.InvariantCulture for consistent output across environments.


284-288: Empty catch blocks hide failures.

Swallowing all exceptions silently makes debugging difficult. Consider at minimum logging the exception type or using a more specific exception filter.

         catch
         {
-            // ignore and fallback to dir inspection
+            // Fallback to directory inspection if assembly metadata unavailable
+            // This can happen when running without an entry assembly (e.g., unit tests)
         }

If a logging abstraction is available, consider:

catch (Exception ex)
{
    // Log at Debug level for diagnostics
    Debug.WriteLine($"TFM resolution from assembly failed: {ex.GetType().Name}");
}
test/Codebelt.Extensions.BenchmarkDotNet.Tests/BenchmarkWorkspaceTest.cs (1)

304-322: Consider clarifying the duplicate detection logic.

Distinct() on line 320 uses reference equality for Assembly objects. This works correctly if LoadBenchmarkAssemblies returns the same Assembly instances for already-loaded assemblies (which is the expected CLR behavior). However, if the intent is to verify no duplicate assembly names are loaded, consider using a more explicit comparison:

-        var uniqueAssemblies = assemblies.Distinct().ToArray();
-        Assert.Equal(assemblies.Length, uniqueAssemblies.Length);
+        var assemblyNames = assemblies.Select(a => a.GetName().FullName).ToArray();
+        var uniqueNames = assemblyNames.Distinct().ToArray();
+        Assert.Equal(assemblyNames.Length, uniqueNames.Length);

The current implementation is technically correct for the stated purpose but could be more explicit about what "duplicate" means.

test/Codebelt.Extensions.BenchmarkDotNet.Tests/BenchmarkWorkspaceOptionsTest.cs (2)

53-65: Consider using platform-agnostic test paths.

The hardcoded Windows path @"C:\TestRepo" on line 58 may cause confusion or issues when running tests on non-Windows platforms. While this test only verifies string assignment (not filesystem access), using Path.Combine would be more consistent:

-        var testPath = @"C:\TestRepo";
+        var testPath = Path.Combine(Path.GetTempPath(), "TestRepo");

This is a minor consistency improvement since the property is just storing a string.


400-409: Consider more robust type checking for diagnoser verification.

Line 408 uses string matching on GetType().Name.Contains("Memory") which could be fragile if the type name changes. A more robust approach would be to check for the specific type:

-        Assert.Contains(options.Configuration.GetDiagnosers(), d => d.GetType().Name.Contains("Memory"));
+        Assert.Contains(options.Configuration.GetDiagnosers(), d => d is BenchmarkDotNet.Diagnosers.MemoryDiagnoser);

This requires adding a using directive for BenchmarkDotNet.Diagnosers but provides compile-time safety.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f2669a1 and 91a2c47.

⛔ Files ignored due to path filters (6)
  • .docfx/images/32x32.png is excluded by !**/*.png
  • .docfx/images/50x50.png is excluded by !**/*.png
  • .docfx/images/favicon.ico is excluded by !**/*.ico
  • .nuget/ClassLibrary1/icon.png is excluded by !**/*.png
  • .nuget/Codebelt.Extensions.BenchmarkDotNet.Console/icon.png is excluded by !**/*.png
  • .nuget/Codebelt.Extensions.BenchmarkDotNet/icon.png is excluded by !**/*.png
📒 Files selected for processing (66)
  • .docfx/BuildDocfxImage.ps1 (1 hunks)
  • .docfx/PublishDocfxImage.ps1 (1 hunks)
  • .docfx/api/namespaces/ClassLibrary1.md (0 hunks)
  • .docfx/api/namespaces/Codebelt.Extensions.BenchmarkDotNet.Console.md (1 hunks)
  • .docfx/api/namespaces/Codebelt.Extensions.BenchmarkDotNet.md (1 hunks)
  • .docfx/docfx.json (2 hunks)
  • .docfx/includes/availability-default.md (0 hunks)
  • .docfx/includes/availability-modern.md (1 hunks)
  • .docfx/index.md (1 hunks)
  • .docfx/packages/index.md (1 hunks)
  • .docfx/toc.yml (1 hunks)
  • .github/copilot-instructions.md (6 hunks)
  • .github/prompts/benchmark.prompt.md (1 hunks)
  • .github/workflows/ci-pipeline.yml (4 hunks)
  • .nuget/ClassLibrary1/PackageReleaseNotes.txt (0 hunks)
  • .nuget/ClassLibrary1/README.md (0 hunks)
  • .nuget/Codebelt.Extensions.BenchmarkDotNet.Console/PackageReleaseNotes.txt (1 hunks)
  • .nuget/Codebelt.Extensions.BenchmarkDotNet.Console/README.md (1 hunks)
  • .nuget/Codebelt.Extensions.BenchmarkDotNet/PackageReleaseNotes.txt (1 hunks)
  • .nuget/Codebelt.Extensions.BenchmarkDotNet/README.md (1 hunks)
  • CHANGELOG.md (1 hunks)
  • ClassLibrary1.sln (0 hunks)
  • Codebelt.Extensions.BenchmarkDotNet.slnx (1 hunks)
  • Directory.Build.props (6 hunks)
  • Directory.Build.targets (1 hunks)
  • Directory.Packages.props (1 hunks)
  • README.md (1 hunks)
  • reports/tuning/Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspaceBenchmark-report-github.md (1 hunks)
  • reports/tuning/Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspaceOptionsBenchmark-report-github.md (1 hunks)
  • reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkContextBenchmark-report-github.md (1 hunks)
  • reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkProgramBenchmark-report-github.md (1 hunks)
  • reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkWorkerBenchmark-report-github.md (1 hunks)
  • src/ClassLibrary1/Class1.cs (0 hunks)
  • src/ClassLibrary1/ClassLibrary1.csproj (0 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkContext.cs (1 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (1 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs (1 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet.Console/Codebelt.Extensions.BenchmarkDotNet.Console.csproj (1 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs (1 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptions.cs (1 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptionsExtensions.cs (1 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet/Codebelt.Extensions.BenchmarkDotNet.csproj (1 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet/IBenchmarkWorkspace.cs (1 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet/ServiceCollectionExtensions.cs (1 hunks)
  • test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkContextTest.cs (1 hunks)
  • test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs (1 hunks)
  • test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkWorkerTest.cs (1 hunks)
  • test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/Codebelt.Extensions.BenchmarkDotNet.Console.Tests.csproj (1 hunks)
  • test/Codebelt.Extensions.BenchmarkDotNet.Tests/BenchmarkWorkspaceOptionsTest.cs (1 hunks)
  • test/Codebelt.Extensions.BenchmarkDotNet.Tests/BenchmarkWorkspaceTest.cs (1 hunks)
  • test/Codebelt.Extensions.BenchmarkDotNet.Tests/Codebelt.Extensions.BenchmarkDotNet.Tests.csproj (1 hunks)
  • test/Codebelt.Extensions.BenchmarkDotNet.Tests/ServiceCollectionExtensionsTest.cs (1 hunks)
  • test/TestProject1.FunctionalTests/Class1Test.cs (0 hunks)
  • test/TestProject1.FunctionalTests/TestProject1.FunctionalTests.csproj (0 hunks)
  • test/TestProject1/Class1Test.cs (0 hunks)
  • test/TestProject1/TestProject1.Tests.csproj (0 hunks)
  • testenvironments.json (1 hunks)
  • tooling/Codebelt.Extensions.BenchmarkDotNet.Runner/Codebelt.Extensions.BenchmarkDotNet.Runner.csproj (1 hunks)
  • tooling/Codebelt.Extensions.BenchmarkDotNet.Runner/Program.cs (1 hunks)
  • tuning/Codebelt.Extensions.BenchmarkDotNet.Benchmarks/BenchmarkWorkspaceBenchmark.cs (1 hunks)
  • tuning/Codebelt.Extensions.BenchmarkDotNet.Benchmarks/BenchmarkWorkspaceOptionsBenchmark.cs (1 hunks)
  • tuning/Codebelt.Extensions.BenchmarkDotNet.Benchmarks/Codebelt.Extensions.BenchmarkDotNet.Benchmarks.csproj (1 hunks)
  • tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkContextBenchmark.cs (1 hunks)
  • tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkProgramBenchmark.cs (1 hunks)
  • tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.cs (1 hunks)
  • tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks.csproj (1 hunks)
💤 Files with no reviewable changes (11)
  • ClassLibrary1.sln
  • .nuget/ClassLibrary1/README.md
  • src/ClassLibrary1/Class1.cs
  • src/ClassLibrary1/ClassLibrary1.csproj
  • .nuget/ClassLibrary1/PackageReleaseNotes.txt
  • test/TestProject1.FunctionalTests/TestProject1.FunctionalTests.csproj
  • .docfx/api/namespaces/ClassLibrary1.md
  • test/TestProject1/Class1Test.cs
  • test/TestProject1.FunctionalTests/Class1Test.cs
  • .docfx/includes/availability-default.md
  • test/TestProject1/TestProject1.Tests.csproj
🧰 Additional context used
🧬 Code graph analysis (12)
src/Codebelt.Extensions.BenchmarkDotNet/IBenchmarkWorkspace.cs (2)
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs (1)
  • PostProcessArtifacts (75-80)
test/Codebelt.Extensions.BenchmarkDotNet.Tests/ServiceCollectionExtensionsTest.cs (1)
  • PostProcessArtifacts (53-53)
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.cs (4)
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkContextBenchmark.cs (5)
  • GlobalSetup (18-41)
  • Benchmark (43-47)
  • Benchmark (49-53)
  • Benchmark (55-66)
  • Benchmark (68-73)
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkProgramBenchmark.cs (7)
  • GlobalSetup (17-23)
  • Benchmark (25-29)
  • Benchmark (31-35)
  • Benchmark (37-41)
  • Benchmark (43-48)
  • Benchmark (50-54)
  • Benchmark (56-60)
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkWorkerTest.cs (1)
  • IHostEnvironment (485-494)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs (1)
  • ConfigureServices (34-37)
test/Codebelt.Extensions.BenchmarkDotNet.Tests/ServiceCollectionExtensionsTest.cs (2)
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptions.cs (2)
  • BenchmarkWorkspaceOptions (60-310)
  • BenchmarkWorkspaceOptions (95-103)
src/Codebelt.Extensions.BenchmarkDotNet/IBenchmarkWorkspace.cs (2)
  • Assembly (14-14)
  • PostProcessArtifacts (19-19)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (2)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs (3)
  • BenchmarkWorker (16-79)
  • BenchmarkWorker (23-25)
  • ConfigureServices (34-37)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkContext.cs (2)
  • BenchmarkContext (6-22)
  • BenchmarkContext (12-15)
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkContextTest.cs (1)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkContext.cs (2)
  • BenchmarkContext (6-22)
  • BenchmarkContext (12-15)
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkProgramTest.cs (3)
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkContextTest.cs (11)
  • Fact (12-21)
  • Fact (23-36)
  • Fact (38-51)
  • Fact (53-70)
  • Fact (72-84)
  • Fact (86-99)
  • Fact (101-117)
  • Fact (143-158)
  • Fact (160-175)
  • Fact (177-190)
  • Fact (192-222)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (2)
  • BenchmarkProgram (15-69)
  • BenchmarkProgram (17-22)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs (2)
  • BenchmarkWorker (16-79)
  • BenchmarkWorker (23-25)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs (3)
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkWorkerTest.cs (3)
  • IHostEnvironment (485-494)
  • IServiceProvider (496-506)
  • PostProcessArtifacts (534-537)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkContext.cs (2)
  • BenchmarkContext (6-22)
  • BenchmarkContext (12-15)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (2)
  • Run (44-47)
  • Run (58-68)
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptionsExtensions.cs (1)
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptions.cs (2)
  • BenchmarkWorkspaceOptions (60-310)
  • BenchmarkWorkspaceOptions (95-103)
tuning/Codebelt.Extensions.BenchmarkDotNet.Benchmarks/BenchmarkWorkspaceOptionsBenchmark.cs (1)
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptions.cs (3)
  • ValidateOptions (188-196)
  • PostConfigureOptions (155-170)
  • ManualConfig (212-227)
test/Codebelt.Extensions.BenchmarkDotNet.Console.Tests/BenchmarkWorkerTest.cs (1)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkContext.cs (2)
  • BenchmarkContext (6-22)
  • BenchmarkContext (12-15)
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkProgramBenchmark.cs (2)
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkContextBenchmark.cs (6)
  • MemoryDiagnoser (6-74)
  • GlobalSetup (18-41)
  • Benchmark (43-47)
  • Benchmark (49-53)
  • Benchmark (55-66)
  • Benchmark (68-73)
tuning/Codebelt.Extensions.BenchmarkDotNet.Console.Benchmarks/BenchmarkWorkerBenchmark.cs (7)
  • MemoryDiagnoser (14-92)
  • GlobalSetup (23-45)
  • Benchmark (47-51)
  • Benchmark (53-59)
  • Benchmark (61-68)
  • Benchmark (70-74)
  • Benchmark (76-80)
test/Codebelt.Extensions.BenchmarkDotNet.Tests/BenchmarkWorkspaceOptionsTest.cs (2)
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptionsExtensions.cs (1)
  • BenchmarkWorkspaceOptions (65-76)
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspaceOptions.cs (5)
  • BenchmarkWorkspaceOptions (60-310)
  • BenchmarkWorkspaceOptions (95-103)
  • ManualConfig (212-227)
  • PostConfigureOptions (155-170)
  • ValidateOptions (188-196)
🪛 GitHub Check: call-build (Debug) / 🛠️ Build
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

[warning] 191-191:
The behavior of 'string.EndsWith(string)' could vary based on the current user's locale settings. Replace this call in 'Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspace.CleanupResults(string, string)' with a call to 'string.EndsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)


[warning] 82-82:
Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)


[warning] 98-98:
Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)


[warning] 191-191:
The behavior of 'string.EndsWith(string)' could vary based on the current user's locale settings. Replace this call in 'Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspace.CleanupResults(string, string)' with a call to 'string.EndsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)


[warning] 82-82:
Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)


[warning] 98-98:
Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)


[warning] 191-191:
The behavior of 'string.EndsWith(string)' could vary based on the current user's locale settings. Replace this call in 'Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspace.CleanupResults(string, string)' with a call to 'string.EndsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)


[warning] 82-82:
Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)


[warning] 98-98:
Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)


[warning] 191-191:
The behavior of 'string.EndsWith(string)' could vary based on the current user's locale settings. Replace this call in 'Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspace.CleanupResults(string, string)' with a call to 'string.EndsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)

🪛 GitHub Check: call-build (Release) / 🛠️ Build
src/Codebelt.Extensions.BenchmarkDotNet/BenchmarkWorkspace.cs

[warning] 98-98:
Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)


[warning] 82-82:
Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)


[warning] 191-191:
The behavior of 'string.EndsWith(string)' could vary based on the current user's locale settings. Replace this call in 'Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspace.CleanupResults(string, string)' with a call to 'string.EndsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)


[warning] 98-98:
Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)


[warning] 82-82:
Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)


[warning] 191-191:
The behavior of 'string.EndsWith(string)' could vary based on the current user's locale settings. Replace this call in 'Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspace.CleanupResults(string, string)' with a call to 'string.EndsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)


[warning] 98-98:
Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)


[warning] 82-82:
Change return type of method 'LoadAssemblies' from 'System.Collections.Generic.IEnumerable<System.Reflection.Assembly>' to 'System.Collections.Generic.List<System.Reflection.Assembly>' for improved performance (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1859)


[warning] 191-191:
The behavior of 'string.EndsWith(string)' could vary based on the current user's locale settings. Replace this call in 'Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspace.CleanupResults(string, string)' with a call to 'string.EndsWith(string, System.StringComparison)'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310)


[warning] 98-98:
Use 'string.Contains' instead of 'string.IndexOf' to improve readability (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249)

🪛 LanguageTool
reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkProgramBenchmark-report-github.md

[grammar] ~23-~23: Dit kan een fout zijn.
Context: ... ? | - | - | ? |
| 'Access IsDebugBuild property' ...

(QB_NEW_NL)


[grammar] ~24-~24: Zin met fouten
Context: ...| - | - | ? |
| 'Access IsDebugBuild property' ...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~24-~24: Zin met fouten
Context: ... ? |
| 'Access IsDebugBuild property' | .NET 9.0 | 0.0312 n...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~24-~24: Dit kan een fout zijn.
Context: ... ? | - | - | ? |
| 'Check assembly debug build status&...

(QB_NEW_NL)


[grammar] ~25-~25: Zin met fouten
Context: ...| - | - | ? |
| 'Check assembly debug build status' ...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~25-~25: Zin met fouten
Context: ... ? |
| 'Check assembly debug build status' | .NET 9.0 | 2,434.8425 ns | 1...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~25-~25: Dit kan een fout zijn.
Context: ... ? | 0.5510 | 8825 B | ? |
| 'Resolve build configuration from a...

(QB_NEW_NL)


[grammar] ~26-~26: Zin met fouten
Context: ...| 0.5510 | 8825 B | ? |
| 'Resolve build configuration from assembly' ...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~26-~26: Zin met fouten
Context: ...| 'Resolve build configuration from assembly' | .NET 9.0 | 2,256.3108 ns | 122.3223 ...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~26-~26: Dit kan een fout zijn.
Context: ... ? | 0.5484 | 8793 B | ? |
| 'Check entry assembly debug build s...

(QB_NEW_NL)


[grammar] ~27-~27: Zin met fouten
Context: ...| 0.5484 | 8793 B | ? |
| 'Check entry assembly debug build status' ...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~27-~27: Zin met fouten
Context: ...| 'Check entry assembly debug build status' | .NET 9.0 | 2,321.5775 ns | 155.7788 n...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~27-~27:
Context: ...ly debug build status' | .NET 9.0 | 2,321.5775 ns | 155.7788 ns | 166.6816...

(QB_NEW_NL_OTHER_ERROR_IDS_UNNECESSARY_ORTHOGRAPHY_SPACE)


[grammar] ~27-~27:
Context: ...64 ns | 2,149.6204 ns | 2,659.6258 ns | ? | ? | 0.5423 | 8561 B | ...

(QB_NEW_NL_OTHER_ERROR_IDS_UNNECESSARY_ORTHOGRAPHY_SPACE)

.nuget/Codebelt.Extensions.BenchmarkDotNet.Console/README.md

[style] ~11-~11: This phrase is redundant. Consider writing “evolve”.
Context: ...benchmarks easier to compose, test, and evolve over time.

At its core, the package favors con...

(EVOLVE_OVER_TIME)

README.md

[style] ~24-~24: Using many exclamation marks might seem excessive (in this case: 10 exclamation marks for a text that’s 2585 characters long)
Context: ...s.BenchmarkDotNet.Console?logo=nuget) | ![Downloads](https://img.shields.io/nuget...

(EN_EXCESSIVE_EXCLAMATION)

.github/copilot-instructions.md

[style] ~59-~59: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ...responding unit test class must use the exact same namespace:
```csharp
namespac...

(EN_WORDINESS_PREMIUM_EXACT_SAME)

reports/tuning/Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspaceOptionsBenchmark-report-github.md

[grammar] ~16-~16: Dit kan een fout zijn.
Context: ... ? | 0.2657 | 4248 B | ? |
| 'PostConfigureOptions - custom conf...

(QB_NEW_NL)


[grammar] ~17-~17: Zin met fouten
Context: ...| 0.2657 | 4248 B | ? |
| 'PostConfigureOptions - custom config' | .NET 1...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~17-~17: Zin met fouten
Context: ...|
| 'PostConfigureOptions - custom config' | .NET 10.0 | 2,063.4760 ns |...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~17-~17: Dit kan een fout zijn.
Context: ... ? | 0.3027 | 4840 B | ? |
| ...

(QB_NEW_NL)


[grammar] ~18-~18: Fout gevonden
Context: ... | | | |
| 'PostConfigureOptions - default co...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)


[grammar] ~19-~19: Dit kan een fout zijn.
Context: ... ? | 0.2644 | 4248 B | ? |
| 'PostConfigureOptions - custom conf...

(QB_NEW_NL)


[grammar] ~20-~20: Zin met fouten
Context: ...| 0.2644 | 4248 B | ? |
| 'PostConfigureOptions - custom config' | .NET 9...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~20-~20: Zin met fouten
Context: ...|
| 'PostConfigureOptions - custom config' | .NET 9.0 | 3,027.1892 ns |...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~28-~28: Dit kan een fout zijn.
Context: ... ? | 0.2765 | 4464 B | ? |
| ...

(QB_NEW_NL)


[grammar] ~29-~29: Fout gevonden
Context: ... | | | |
| 'Full lifecycle - create, configur...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)


[grammar] ~30-~30: Dit kan een fout zijn.
Context: ... ? | 0.2740 | 4464 B | ? |
| ...

(QB_NEW_NL)


[grammar] ~31-~31: Fout gevonden
Context: ... | | | |
| 'Property access - RepositoryPath&...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)


[grammar] ~32-~32: Dit kan een fout zijn.
Context: ... ? | - | - | ? |
| 'Property access - Configuration&#3...

(QB_NEW_NL)


[grammar] ~33-~33: Zin met fouten
Context: ...| - | - | ? |
| 'Property access - Configuration' ...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~33-~33: Zin met fouten
Context: ... ? |
| 'Property access - Configuration' | .NET 10.0 | 0.6834...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~33-~33: Dit kan een fout zijn.
Context: ... ? | - | - | ? |
| ...

(QB_NEW_NL)


[grammar] ~34-~34: Fout gevonden
Context: ... | | | |
| 'Property access - RepositoryPath&...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)


[grammar] ~35-~35: Dit kan een fout zijn.
Context: ... ? | - | - | ? |
| 'Property access - Configuration&#3...

(QB_NEW_NL)


[grammar] ~36-~36: Zin met fouten
Context: ...| - | - | ? |
| 'Property access - Configuration' ...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~36-~36: Zin met fouten
Context: ... ? |
| 'Property access - Configuration' | .NET 9.0 | 0.7295...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)


[grammar] ~36-~36: Dit kan een fout zijn.
Context: ... ? | - | - | ? |
| ...

(QB_NEW_NL)


[grammar] ~37-~37: Fout gevonden
Context: ... | | | |
| 'Property modification - set all p...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)


[grammar] ~38-~38: Dit kan een fout zijn.
Context: ... ? | 0.2594 | 4120 B | ? |
| ...

(QB_NEW_NL)


[grammar] ~39-~39: Fout gevonden
Context: ... | | | |
| 'Property modification - set all p...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)


[grammar] ~40-~40: Dit kan een fout zijn.
Context: ... ? | 0.2529 | 4120 B | ? |
| ...

(QB_NEW_NL)


[grammar] ~41-~41: Fout gevonden
Context: ... | | | |
| 'ValidateOptions - valid state&#39...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)


[grammar] ~42-~42: Dit kan een fout zijn.
Context: ... ? | - | - | ? |
| ...

(QB_NEW_NL)


[grammar] ~43-~43: Fout gevonden
Context: ... | | | |
| 'ValidateOptions - valid state&#39...

(QB_NEW_NL_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)

.docfx/packages/index.md

[style] ~12-~12: Using many exclamation marks might seem excessive (in this case: 6 exclamation marks for a text that’s 1317 characters long)
Context: ...s.BenchmarkDotNet.Console?logo=nuget) | ![Downloads](https://img.shields.io/nuget...

(EN_EXCESSIVE_EXCLAMATION)

🪛 markdownlint-cli2 (0.18.1)
reports/tuning/Codebelt.Extensions.BenchmarkDotNet.BenchmarkWorkspaceBenchmark-report-github.md

1-1: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


14-14: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkProgramBenchmark-report-github.md

1-1: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


14-14: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

README.md

15-15: Bare URL used

(MD034, no-bare-urls)

reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkWorkerBenchmark-report-github.md

1-1: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


14-14: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

.github/copilot-instructions.md

153-153: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


154-154: Spaces inside emphasis markers

(MD037, no-space-in-emphasis)


166-166: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


247-247: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

reports/tuning/Codebelt.Extensions.BenchmarkDotNet.Console.BenchmarkContextBenchmark-report-github.md

1-1: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


14-14: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🪛 YAMLlint (1.37.1)
.docfx/toc.yml

[error] 1-1: wrong new line character: expected \n

(new-lines)

.github/workflows/ci-pipeline.yml

[error] 1-1: wrong new line character: expected \n

(new-lines)

⏰ 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). (8)
  • GitHub Check: call-test (ubuntu-24.04, Debug) / 🧪 Test
  • GitHub Check: call-test (windows-11-arm, Release) / 🧪 Test
  • GitHub Check: call-test (windows-2025, Debug) / 🧪 Test
  • GitHub Check: call-test (ubuntu-24.04, Release) / 🧪 Test
  • GitHub Check: call-pack (Debug) / 📦 Pack
  • GitHub Check: call-test (windows-11-arm, Debug) / 🧪 Test
  • GitHub Check: call-pack (Release) / 📦 Pack
  • GitHub Check: call-test (windows-2025, Release) / 🧪 Test

Copy link

@coderabbitai coderabbitai bot left a 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: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91a2c47 and f889f3f.

📒 Files selected for processing (2)
  • .nuget/Codebelt.Extensions.BenchmarkDotNet/README.md (1 hunks)
  • README.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .nuget/Codebelt.Extensions.BenchmarkDotNet/README.md
🧰 Additional context used
🪛 LanguageTool
README.md

[style] ~94-~94: Using many exclamation marks might seem excessive (in this case: 10 exclamation marks for a text that’s 3859 characters long)
Context: ...s.BenchmarkDotNet.Console?logo=nuget) | ![Downloads](https://img.shields.io/nuget...

(EN_EXCESSIVE_EXCLAMATION)

⏰ 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). (7)
  • 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, Release) / 🧪 Test
  • GitHub Check: call-test (windows-2025, Debug) / 🧪 Test
  • GitHub Check: call-pack (Debug) / 📦 Pack
  • GitHub Check: call-test (ubuntu-24.04, Debug) / 🧪 Test
🔇 Additional comments (3)
README.md (3)

1-11: Comprehensive and consistent rebranding from ClassLibrary1 to Codebelt.Extensions.BenchmarkDotNet.

The header, title, badges, and description have been thoroughly updated. Repository links, CI/CD badges, and all references now point to the new project identity. The description accurately reflects the shift to a BenchmarkDotNet companion library with MIT licensing.


13-53: Folder structure explanation and layout example are clear and well-organized.

The architectural principles (tuning, tooling, reports separation) align well with the PR objectives and provide clear guidance for users. The ASCII diagram effectively visualizes the recommended repository structure.


59-81: Code example demonstrates correct usage of the library API.

The BenchmarkProgram.Run() example with BenchmarkWorkspaceOptions configuration is accurate and shows proper integration with BenchmarkDotNet jobs and runtimes. The code is syntactically correct and idiomatic for .NET console hosting patterns.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4788207 and d89b6b1.

📒 Files selected for processing (2)
  • .github/workflows/ci-pipeline.yml (4 hunks)
  • src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (2)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkWorker.cs (3)
  • BenchmarkWorker (16-79)
  • BenchmarkWorker (23-25)
  • ConfigureServices (34-37)
src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkContext.cs (2)
  • BenchmarkContext (6-22)
  • BenchmarkContext (12-15)
🪛 YAMLlint (1.37.1)
.github/workflows/ci-pipeline.yml

[error] 1-1: wrong new line character: expected \n

(new-lines)

⏰ 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). (9)
  • GitHub Check: call-test (windows-11-arm, Debug) / 🧪 Test
  • GitHub Check: call-test (ubuntu-24.04-arm, Release) / 🧪 Test
  • GitHub Check: call-test (windows-11-arm, Release) / 🧪 Test
  • GitHub Check: call-test (ubuntu-24.04, Release) / 🧪 Test
  • GitHub Check: call-test (ubuntu-24.04, Debug) / 🧪 Test
  • GitHub Check: call-test (windows-2025, Debug) / 🧪 Test
  • GitHub Check: call-test (ubuntu-24.04-arm, Debug) / 🧪 Test
  • GitHub Check: call-pack (Debug) / 📦 Pack
  • GitHub Check: call-test (windows-2025, Release) / 🧪 Test
🔇 Additional comments (7)
.github/workflows/ci-pipeline.yml (5)

25-29: Verify benchmarkdotnet.snk is available to the reusable build workflow. If the key is fetched from secrets/artifacts, ensure the new filename is referenced consistently there; otherwise signing will fail.


55-56: build: true / restore: true for xUnit v3 dependency looks reasonable. Just ensure the reusable test workflow doesn’t already build/restore by default to avoid duplicate work.


61-66: SonarCloud org/projectKey rename: ensure the target project exists and tokens have access. Otherwise analysis will fail post-test.


68-74: Codecov repository rename: ensure Codecov is configured for codebeltnet/benchmarkdotnet. Otherwise uploads may be rejected or attributed to the wrong repo.


45-56: All GitHub runner labels are valid. ubuntu-24.04, windows-2025, ubuntu-24.04-arm, and windows-11-arm are all supported GitHub-hosted runner labels and will schedule correctly.

Likely an incorrect or invalid review comment.

src/Codebelt.Extensions.BenchmarkDotNet.Console/BenchmarkProgram.cs (2)

17-22: Past null reference issue has been resolved.

The null-coalescing operator ?? now provides a safe fallback to Assembly.GetExecutingAssembly() when Assembly.GetEntryAssembly() returns null, addressing the concern raised in the previous review.


24-34: LGTM!

The static properties are well-documented and correctly initialized by the static constructor.

@@ -1,4 +1,4 @@
name: ClassLibrary1 CI Pipeline
name: BenchmarkDotNet CI Pipeline
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix YAML newline style (CRLF vs LF) to satisfy yamllint. The lint error suggests the file is committed with \r\n; normalize to \n to avoid CI noise.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 1-1: wrong new line character: expected \n

(new-lines)

🤖 Prompt for AI Agents
In .github/workflows/ci-pipeline.yml around line 1, the file currently uses CRLF
line endings which triggers yamllint; convert the file to use LF-only newlines.
Open the file in an editor or run a tool (e.g., dos2unix) or git commands (git
config core.autocrlf false; git rm --cached .github/workflows/ci-pipeline.yml;
git add --renormalize .github/workflows/ci-pipeline.yml) to normalize to \n,
commit the change, and optionally add a .gitattributes entry (*.yml text eol=lf)
to prevent future CRLF commits.

@codecov
Copy link

codecov bot commented Dec 12, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@sonarqubecloud
Copy link

@gimlichael gimlichael merged commit 6cc3e21 into main Dec 12, 2025
21 checks passed
@gimlichael gimlichael deleted the v1.0.0/benchmarkdotnet-api branch December 12, 2025 00:17
@coderabbitai coderabbitai bot mentioned this pull request Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants