Ackara / VBench

An graphical HTML exporter for BenchmarkDotNet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VBench

Nuget

The Problem

You are using BenchmarkDotNet to measure your project's performance. In addition, you also want to keep track of the project's performance over time however, BenchmarkDotNet do not have an exporter/report to track said changes.

The Solution

VBench is a netstandard library that contains a BenchmarkDotNet.Exporter.IExporter that will enable you to track and compare, past and present benchmark reports via a nice visual html report.

Usage

Once you have added the nuget package to your project. Add a new instance of the TimelineExporter class as shown below.

using Acklann.VBench;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;

namespace VBench.Sample
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, DefaultConfig.Instance
                .With(new TimelineExporter()));
        }
    }
}

When you run your benchmarks two new files (vbench.html and vbench.litedb) will be added to the BenchmarkDotNet.Artifacts\results folder. All past and present results will be stored invbench.litedb while vbench.html will present it's contents. Check out the example below.

timeline

About

An graphical HTML exporter for BenchmarkDotNet.

License:MIT License


Languages

Language:HTML 70.7%Language:TypeScript 10.3%Language:PowerShell 8.5%Language:C# 6.2%Language:CSS 4.3%