NBench.Runner 0.3.0

NBench is a cross-platform automated performance profiling and testing framework for.NET applications.

There is a newer version of this package available.
See the version list below for details.
Install-Package NBench.Runner -Version 0.3.0
dotnet add package NBench.Runner --version 0.3.0
<PackageReference Include="NBench.Runner" Version="0.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NBench.Runner --version 0.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

This release introduces some breaking changes to NBench:
The biggest feature included in this release is the addition of tracing support, which is exposed directly to end-users so they can capture trace events and include them in the output produced by NBench.
You can access the `IBenchmarkTrace` object through the `BenchmarkContext` passed into any of your `PerfSetup`, `PerfBenchmark`, or `PerfCleanup` methods like such:
public class TracingBenchmark
public void Setup(BenchmarkContext context)
[PerfBenchmark(TestMode = TestMode.Test, NumberOfIterations = IterationCount, RunTimeMilliseconds = 1000)]
[MemoryAssertion(MemoryMetric.TotalBytesAllocated, MustBe.LessThan, ByteConstants.EightKb)]
public void Run1(BenchmarkContext context)
public void Cleanup(BenchmarkContext context)
`NBench.Runner.exe` now takes a `trace=true|false` commandline argument, which will enable the new tracing feature introduced in this release.
Tracing is disabled by default**.
Skippable Warmups**
You can now elect to skip warmups altogether for your specs. This feature is particularly useful for long-running iteration benchmarks, which are often used for stress tests. Warmups don't add any value here.
Here's how you can skip warmups:
[PerfBenchmark(TestMode = TestMode.Test, NumberOfIterations = IterationCount, RunTimeMilliseconds = 1000, SkipWarmups = true)]
[MemoryAssertion(MemoryMetric.TotalBytesAllocated, MustBe.LessThan, ByteConstants.EightKb)]
public void Run1(BenchmarkContext context)
Just set `SkipWarmups = true` on your `PerfBenchmark` attribute wherever you wish to skip a warmup.
Foreground thread is no longer given high priority when concurrent mode is on**.
If you are running the `NBench.Runner` with `concurrent=true`, we no longer give the main foreground thread high priority as this resulted in some unfair scheduling during concurrent tests. All threads within the `NBench.Runner` process all share the same priority now.
Markdown reports include additional data**
All markdown reports now include:
The concurrency setting for NBench
The tracing setting for NBench
A flag indicating if warmups were skipped or not
All of these were added in order to make it easy for end-users reading the reports to know what the NBench settings were at the time the report was produced.


This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.2.2 22,437 7/24/2018
1.2.1 1,183 7/11/2018
1.2.0 400 7/10/2018
1.1.0 1,806 7/2/2018
1.0.4 11,634 6/16/2017
1.0.3 557 6/10/2017
1.0.2 410 6/2/2017
1.0.1 4,516 3/31/2017
1.0.0 1,116 3/15/2017
0.3.4 2,200 12/16/2016
0.3.3 4,311 12/8/2016
0.3.2 447 12/8/2016
0.3.1 9,935 8/16/2016
0.3.0 2,639 5/24/2016
0.2.2 734 5/3/2016
0.2.1 1,334 4/7/2016
0.2.0 408 4/6/2016
0.1.6 6,552 2/15/2016
0.1.5 2,358 12/10/2015
0.1.4 412 12/10/2015
0.1.3 433 12/8/2015
0.1.2 453 12/8/2015
0.1.1 429 12/7/2015
0.1.0 442 12/5/2015
Show less