NBench 0.0.2

There is a newer version of this package available.
See the version list below for details.
Install-Package NBench -Version 0.0.2
dotnet add package NBench --version 0.0.2
<PackageReference Include="NBench" Version="0.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NBench --version 0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NBench, 0.0.2"
#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 as a Cake Addin
#addin nuget:?package=NBench&version=0.0.2

// Install NBench as a Cake Tool
#tool nuget:?package=NBench&version=0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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

This package has no dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on NBench:

Package Downloads
Pro.NBench.xUnit

Allows NBench tests to be discovered, executed, reported, and debugged using xUnit in ReSharper, and Visual Studio Test Explorer. Please refer to the project Url for usage information: https://github.com/Pro-Coded/Pro.NBench.xUnit

NBench.PerformanceCounters

Windows only. Adds performance counter support to NBench measurements.

NBench.Runner.DotNetCli

Cross-platform performance benchmarking and testing framework for .NET applications.

NBench-PerfAssert

Package Description

GitHub repositories (7)

Showing the top 5 popular GitHub repositories that depend on NBench:

Repository Stars
akkadotnet/akka.net
Port of Akka actors for .NET
Azure/DotNetty
DotNetty project – a port of netty, event-driven asynchronous network application framework
RicoSuter/NJsonSchema
JSON Schema reader, generator and validator for .NET
SonarSource/sonar-dotnet
Code analyzer for C# and VB.NET projects https://redirect.sonarsource.com/plugins/vbnet.html
helios-io/helios
reactive socket middleware for .NET
Version Downloads Last updated
2.0.1 76,873 2/25/2020
2.0.0 355 2/24/2020
1.2.2 105,888 7/24/2018
1.2.1 1,861 7/11/2018
1.2.0 681 7/10/2018
1.1.0 4,608 7/2/2018
1.0.4 116,284 6/16/2017
1.0.3 907 6/11/2017
1.0.2 863 6/2/2017
1.0.1 22,479 3/31/2017
1.0.0 3,514 3/15/2017
0.3.4 31,672 12/16/2016
0.3.3 1,077 12/8/2016
0.3.2 796 12/8/2016
0.3.1 10,503 8/16/2016
0.3.0 7,207 5/24/2016
0.2.2 1,970 5/3/2016
0.2.1 2,041 4/7/2016
0.2.0 785 4/6/2016
0.1.6 1,325 2/15/2016
0.1.5 12,169 12/10/2015
0.1.4 768 12/10/2015
0.1.3 766 12/8/2015
0.1.2 732 12/8/2015
0.1.1 742 12/7/2015
0.1.0 809 12/4/2015
0.0.2 781 12/4/2015

First bleeding-edge, alpha release of NBench.
To write an NBench test, use the following syntax:
```csharp
public class SimpleCounterBenchmark
{
public const string CounterName = "DumbCounter";
private Counter _counter;
[PerfSetup]
public void SetUp(BenchmarkContext context)
{
_counter = context.GetCounter(CounterName);
}
/// <summary>
/// Run 3 tests, 1 second long each
/// </summary>
[PerformanceBenchmark(Description = "Simple iteration collection test", RunMode = RunType.Iterations, TestMode = TestType.Test, RunTimeMilliseconds = 1000, NumberOfIterations = 30)]
[CounterMeasurement(CounterName)]
[MemoryAssertion(MemoryMetric.TotalBytesAllocated, MustBe.LessThan, ByteConstants.EightKb)]
[GcTotalAssertion(GcMetric.TotalCollections, GcGeneration.Gen2, MustBe.ExactlyEqualTo, 0d)]
public void Run()
{
_counter.Increment();
}
[PerfCleanup]
public void CleanUp(BenchmarkContext context)
{
//no-op
}
}
```