NBench.Runner 0.1.0

.NET Framework 4.5
There is a newer version of this package available.
See the version list below for details.
NuGet\Install-Package NBench.Runner -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package NBench.Runner --version 0.1.0
<PackageReference Include="NBench.Runner" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NBench.Runner --version 0.1.0
#r "nuget: NBench.Runner, 0.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install NBench.Runner as a Cake Addin
#addin nuget:?package=NBench.Runner&version=0.1.0

// Install NBench.Runner as a Cake Tool
#tool nuget:?package=NBench.Runner&version=0.1.0

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

Product Versions
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on NBench.Runner:

Repository Stars
cuteant/SpanNetty
Port of Netty(v4.1.51.Final) for .NET
Version Downloads Last updated
1.2.2 52,794 7/24/2018
1.2.1 2,249 7/11/2018
1.2.0 998 7/10/2018
1.1.0 4,805 7/2/2018
1.0.4 13,805 6/16/2017
1.0.3 989 6/10/2017
1.0.2 810 6/2/2017
1.0.1 5,298 3/31/2017
1.0.0 1,511 3/15/2017
0.3.4 5,232 12/16/2016
0.3.3 4,727 12/8/2016
0.3.2 845 12/8/2016
0.3.1 10,404 8/16/2016
0.3.0 3,072 5/24/2016
0.2.2 1,142 5/3/2016
0.2.1 1,738 4/7/2016
0.2.0 804 4/6/2016
0.1.6 7,003 2/15/2016
0.1.5 2,864 12/10/2015
0.1.4 819 12/10/2015
0.1.3 862 12/8/2015
0.1.2 861 12/8/2015
0.1.1 920 12/7/2015
0.1.0 865 12/5/2015

First "production-ready" release of NBench.
Please see our detailed [NBench README and FAQ](https://github.com/petabridge/nbench) for instructions and documentation!
To use NBench, install the NBench package from NuGet:
```
PS> Install-Package NBench
```
And then create a POCO class with a default constructor and some methods, like this:
```csharp
using NBench.Util;
using NBench;
/// <summary>
/// Test to see if we can achieve max throughput on a <see cref="AtomicCounter"/>
/// </summary>
public class CounterPerfSpecs
{
private Counter _counter;
[PerfSetup]
public void Setup(BenchmarkContext context)
{
_counter = context.GetCounter("TestCounter");
}
[PerfBenchmark(Description = "Test to ensure that a minimal throughput test can be rapidly executed.",
NumberOfIterations = 3, RunMode = RunMode.Throughput,
RunTimeMilliseconds = 1000, TestMode = TestMode.Test)]
[CounterThroughputAssertion("TestCounter", MustBe.GreaterThan, 10000000.0d)]
[MemoryAssertion(MemoryMetric.TotalBytesAllocated, MustBe.LessThanOrEqualTo, ByteConstants.ThirtyTwoKb)]
[GcTotalAssertion(GcMetric.TotalCollections, GcGeneration.Gen2, MustBe.ExactlyEqualTo, 0.0d)]
public void Benchmark()
{
_counter.Increment();
}
[PerfCleanup]
public void Cleanup(){
// does nothing
}
}
```
After defining some NBench `PerfBenchmark` methods and declaring some measurements, you can run your benchmark by downloading the `NBench.Runner.exe` via NuGet.
```
PS> Install-Package NBench.Runner
PS> .\packages\NBench.Runner\NBench.Runner.exe .\src\bin\Debug\MyPerfTests.dll output-directory="C:\Perf"
```
And this command will run your `PerfBenchmark` and write output [that looks like this](https://gist.github.com/Aaronontheweb/8e0bfa2cccc63f5bd8bf) to a markdown file in the `output-directory`.