forked from ServiceStack/ServiceStack.Text
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
35 lines (32 loc) · 1 KB
/
Program.cs
File metadata and controls
35 lines (32 loc) · 1 KB
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
using System;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Validators;
namespace ServiceStack.Text.Benchmarks
{
public class Program
{
public static void Main(string[] args)
{
var benchmarks = new[] {
typeof(JsonDeserializationBenchmarks),
typeof(ParseBuiltinBenchmarks)
};
var switcher = new BenchmarkSwitcher(benchmarks);
foreach (var benchmark in benchmarks)
{
switcher.Run(
args: new[] {benchmark.Name},
config: ManualConfig
.Create(DefaultConfig.Instance)
//.With(Job.RyuJitX64)
.With(Job.Core)
.With(Job.Clr)
.With(new BenchmarkDotNet.Diagnosers.CompositeDiagnoser())
.With(ExecutionValidator.FailOnError)
);
}
}
}
}