forked from mini-software/MiniExcel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.cs
43 lines (38 loc) · 1.36 KB
/
Config.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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;
namespace MiniExcelLibs.Benchmarks
{
public class Config : ManualConfig
{
public const int Iterations = 3;
public Config()
{
AddLogger(ConsoleLogger.Default);
AddExporter(CsvExporter.Default);
AddExporter(MarkdownExporter.GitHub);
AddExporter(HtmlExporter.Default);
var md = MemoryDiagnoser.Default;
AddDiagnoser(md);
AddColumn(TargetMethodColumn.Method);
AddColumn(StatisticColumn.Mean);
AddColumn(StatisticColumn.StdDev);
AddColumn(StatisticColumn.Error);
AddColumn(BaselineRatioColumn.RatioMean);
AddColumnProvider(DefaultColumnProviders.Metrics);
AddJob(Job.ShortRun
.WithLaunchCount(1)
.WithWarmupCount(2)
.WithUnrollFactor(Iterations)
.WithIterationCount(3)
);
Orderer = new DefaultOrderer(SummaryOrderPolicy.FastestToSlowest);
Options |= ConfigOptions.JoinSummary;
}
}
}