Files
Dapper/Dapper.Tests.Performance/Config.cs
T
Nick Craver 0b168789fd Benchmarks: updating libs and overall runner (#1123)
This is prepping a run we can drop into the README easily. And more info on allocations and such along with it. It's finishing off the benchmark port getting it into a good output state (something we can copy/paste). It removes Simple.Data because the package was debug and causes a lot of issues.

This doesn't output 100% like we want yet (fastest to slowest). BenchmarkDotNet joins summary results after ordering...we need to post-order that. I'm asking the maintainers how to do so.

Also note Belgrade was not parameterizing before, giving it a huge unfair advantage. This has been fixed to be apples:apples.
2018-09-10 20:22:10 -04:00

47 lines
1.3 KiB
C#

using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Exporters.Csv;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Order;
using Dapper.Tests.Performance.Helpers;
namespace Dapper.Tests.Performance
{
public class Config : ManualConfig
{
public const int Iterations = 5000;
public Config()
{
Add(ConsoleLogger.Default);
Add(CsvExporter.Default);
Add(MarkdownExporter.GitHub);
Add(HtmlExporter.Default);
var md = new MemoryDiagnoser();
Add(md);
Add(new ORMColum());
Add(TargetMethodColumn.Method);
Add(new ReturnColum());
Add(StatisticColumn.Mean);
Add(StatisticColumn.StdDev);
Add(StatisticColumn.Error);
Add(BaselineScaledColumn.Scaled);
Add(md.GetColumnProvider());
Add(Job.Dry
.WithLaunchCount(1)
.WithWarmupCount(1)
.WithInvocationCount(Iterations)
.WithIterationCount(10)
);
Set(new DefaultOrderer(SummaryOrderPolicy.FastestToSlowest));
SummaryPerType = false;
}
}
}