![]() |
VOOZH | about |
dotnet add package Codebelt.Extensions.BenchmarkDotNet.Console --version 1.3.0
NuGet\Install-Package Codebelt.Extensions.BenchmarkDotNet.Console -Version 1.3.0
<PackageReference Include="Codebelt.Extensions.BenchmarkDotNet.Console" Version="1.3.0" />
<PackageVersion Include="Codebelt.Extensions.BenchmarkDotNet.Console" Version="1.3.0" />Directory.Packages.props
<PackageReference Include="Codebelt.Extensions.BenchmarkDotNet.Console" />Project file
paket add Codebelt.Extensions.BenchmarkDotNet.Console --version 1.3.0
#r "nuget: Codebelt.Extensions.BenchmarkDotNet.Console, 1.3.0"
#:package Codebelt.Extensions.BenchmarkDotNet.Console@1.3.0
#addin nuget:?package=Codebelt.Extensions.BenchmarkDotNet.Console&version=1.3.0Install as a Cake Addin
#tool nuget:?package=Codebelt.Extensions.BenchmarkDotNet.Console&version=1.3.0Install as a Cake Tool
A structured, host-based execution model for running BenchmarkDotNet benchmarks in console applications.
Codebelt.Extensions.BenchmarkDotNet.Console extends the Codebelt.Extensions.BenchmarkDotNet package with a dedicated console runner built on the Microsoft Generic Host.
It provides a predictable startup model, consistent dependency injection, and a managed application lifecycle for benchmark execution, aligning benchmarks with the same hosting principles used in modern .NET applications.
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.
At its core, the package favors convention over configuration and promotes benchmarks as first-class, host-managed workloads rather than ad-hoc console routines.
Benchmarks are executed through a console-hosted Generic Host, allowing full participation in dependency injection, configuration, logging and more.
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Environments;
using BenchmarkDotNet.Jobs;
using Codebelt.Extensions.BenchmarkDotNet.Console;
public class Program
{
public static void Main(string[] args)
{
BenchmarkProgram.Run(args, o =>
{
o.AllowDebugBuild = BenchmarkProgram.IsDebugBuild;
o.ConfigureBenchmarkDotNet(c =>
{
var slimJob = BenchmarkWorkspaceOptions.Slim;
return c.AddJob(slimJob.WithRuntime(CoreRuntime.Core90))
.AddJob(slimJob.WithRuntime(CoreRuntime.Core10_0));
});
});
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
Version: 1.3.0
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Microsoft.NET.Test.Sdk has been upgraded from version 18.5.1 to 18.6.0 for improved test framework reliability
# Improvements
- EXTENDED BenchmarkProgram class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace to include RunAsync equivalent methods of the existing Run methods for improved asynchronous hosting scenarios
Version: 1.2.7
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
Version: 1.2.6
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
Version: 1.2.5
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
Version: 1.2.4
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
Version: 1.2.3
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
Version: 1.2.2
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
Version: 1.2.1
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
Version: 1.2.0
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
# Breaking Changes
- REMOVED BenchmarkWorker class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace and functionality has been merged into the BenchmarkProgram class to streamline the hosting and execution of benchmarks
Version: 1.1.0
Availability: .NET 10 and .NET 9
# ALM
- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs)
# Improvements
- EXTENDED BenchmarkProgram class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace to support an optional service configurator delegate for customizing the IServiceCollection during host building
- EXTENDED BenchmarkWorker class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace to support skipping benchmarks that already have generated reports based on the BenchmarkWorkspaceOptions.SkipBenchmarksWithReports property
- CHANGED BenchmarkWorker class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace to conditionally suppress console status messages in services based on whether you are in a debugging session or not
Version: 1.0.0
Availability: .NET 10 and .NET 9
# New Features
- ADDED BenchmarkContext class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace that represents the command-line context for a benchmark run
- ADDED BenchmarkProgram class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace that provides the main entry point for hosting and running benchmarks using BenchmarkDotNet
- ADDED BenchmarkWorker class in the Codebelt.Extensions.BenchmarkDotNet.Console namespace that is responsible for executing benchmarks within the console host