DTLib.Demystifier/test/Ben.Demystifier.Benchmarks/Exceptions.cs
Nick Craver 38d7faeda9 Add initial benchmark setup
This adds all the bootstrapping to quickly add benchmarks for pieces afterwards. Instructions for running added to the README.
2018-02-01 21:24:08 -05:00

19 lines
518 B
C#

using System;
using System.Diagnostics;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Jobs;
namespace Ben.Demystifier.Benchmarks
{
[ClrJob, CoreJob]
[Config(typeof(Config))]
public class ExceptionTests
{
[Benchmark(Baseline = true, Description = ".ToString()")]
public string Baseline() => new Exception().ToString();
[Benchmark(Description = "Demystify().ToString()")]
public string Demystify() => new Exception().Demystify().ToString();
}
}