Benchmark framework for .NET and Mono
C#
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests/BenchmarkSuite.Tests
.gitignore
.travis.yml
BenchmarkSuite.sln
LICENSE
README.md

README.md

BenchmarkSuite

Benchmark framework for .NET and Mono

Downloads:

  • BenchmarkSuite.ConsoleRunner ConsoleRunner
  • BenchmarkSuite.Framework NuGet

Introduction

Benchmark Suite allows to write benchmarks in NUnit-style, when one can mark the methods with [Bench] attributes and framework cares about running and collecting the statistics. The sample of writing benchmarking

[BenchFixture]
public class MyClass
{
    const int nIter=100000000;

    [Bench]
    public void BenchmarkAdding()
    {
        int x = 0;

        var b = Benchmark.StartNew ();
        for (int i = 0; i < nIter; i++) {
            //benchmarking adding operation
            x += 1;
        }
        b.Stop ();

    }

}

To start benchmarking run bench-console.exe <your-assembly-name> from command line and output with benchmarks and statistical data will be generated into the file BenchmarkResults.xml