forked from dgarage/LightningBenchmarks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BenchmarkConfiguration.cs
34 lines (31 loc) · 1 KB
/
BenchmarkConfiguration.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
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Exporters.Csv;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using BenchmarkDotNet.Validators;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Jobs;
namespace Lightning.Bench
{
public class BenchmarkConfiguration : ManualConfig
{
public BenchmarkConfiguration()
{
Add(JitOptimizationsValidator.DontFailOnError); // ALLOW NON-OPTIMIZED DLLS
Add(DefaultConfig.Instance.GetLoggers().ToArray()); // manual config has no loggers by default
Add(DefaultConfig.Instance.GetExporters().ToArray()); // manual config has no exporters by default
Add(DefaultConfig.Instance.GetColumnProviders().ToArray()); // manual config has no columns by default
Add(CsvMeasurementsExporter.Default);
Add(RPlotExporter.Default);
var job = new Job();
job.Run.TargetCount = 100;
job.Run.LaunchCount = 1;
job.Run.WarmupCount = 0;
job.Run.InvocationCount = 1;
job.Run.UnrollFactor = 1;
Add(job);
}
}
}