-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathCustomConfig.cs
More file actions
28 lines (25 loc) · 873 Bytes
/
CustomConfig.cs
File metadata and controls
28 lines (25 loc) · 873 Bytes
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
using System.Runtime.InteropServices;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
using BenchmarkDotNet.Environments;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Validators;
namespace StackExchange.Redis.Benchmarks
{
internal class CustomConfig : ManualConfig
{
protected virtual Job Configure(Job j) => j;
public CustomConfig()
{
AddDiagnoser(MemoryDiagnoser.Default);
AddColumn(StatisticColumn.OperationsPerSecond);
AddValidator(JitOptimizationsValidator.FailOnError);
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
AddJob(Configure(Job.Default.WithRuntime(ClrRuntime.Net481)));
}
AddJob(Configure(Job.Default.WithRuntime(CoreRuntime.Core80)));
}
}
}