![]() |
VOOZH | about |
dotnet add package Neco.BenchmarkLibrary --version 0.2.3
NuGet\Install-Package Neco.BenchmarkLibrary -Version 0.2.3
<PackageReference Include="Neco.BenchmarkLibrary" Version="0.2.3" />
<PackageVersion Include="Neco.BenchmarkLibrary" Version="0.2.3" />Directory.Packages.props
<PackageReference Include="Neco.BenchmarkLibrary" />Project file
paket add Neco.BenchmarkLibrary --version 0.2.3
#r "nuget: Neco.BenchmarkLibrary, 0.2.3"
#:package Neco.BenchmarkLibrary@0.2.3
#addin nuget:?package=Neco.BenchmarkLibrary&version=0.2.3Install as a Cake Addin
#tool nuget:?package=Neco.BenchmarkLibrary&version=0.2.3Install as a Cake Tool
👁 Nuget (with prereleases)
👁 GitHub License
A few helpers around BenchmarkDotNet
using Neco.BenchmarkLibrary;
// Run all benchmarks in an assembly with the default (NetConfig) configuration
BenchmarkStarter.Run(typeof(Program).Assembly);
// Run all benchmarks in an assembly with a specific configuation
// noOverwrite: true to save the benchmark in a '[date]-[time]' directory, instead of the default 'results'
BenchmarkStarter.Run<Net8Net9MigrationConfig>(typeof(Program).Assembly, noOverwrite: true);
// Run a specific benchmarks
BenchmarkStarter.Run<SomeBenchmark>();
BenchmarkStarter.Run<SomeBenchmark, Net8Net9MigrationConfig>();
Does not use BenchmarkDotNet, but produces (rough) performance estimates a lot faster (~6 sec per benchmark class). This supports only a very small subset of Benchmark creation features: GlobalSetup, GlobalCleanup, Params
Results are written to the console
using Neco.BenchmarkLibrary;
// Run all benchmarks in an assembly
BenchmarkStarter.QuickBench(typeof(Program).Assembly);
// Run a specific benchmark
BenchmarkStarter.QuickBench<SomeBenchmark>();
// This is almost equivalent to
PerformanceHelper.GetPerformanceRough("SomeBenchmark.Method1", () => new SomeBenchmark().Method());
// Output will look like this
SomeBenchmark.Method1 35,757,090 ops in 5,000.001ms = clean per operation: 0.108µs or 9,298,494.945op/s with 24 Bytes per run and GC 102/0/0
SomeBenchmark.Method1 TotalCPUTime per operation: 4,984.375ms or clean 9,336,433.859op/s for a factor of 0.997
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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.