-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
41 lines (34 loc) · 1020 Bytes
/
Copy pathProgram.cs
File metadata and controls
41 lines (34 loc) · 1020 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
29
30
31
32
33
34
35
36
37
38
39
40
41
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Exporters.Csv;
using BenchmarkDotNet.Running;
using FrozenProof.Benchmarks;
using FrozenProof.Diagnostics;
if (args.Contains("types"))
{
Diagnostic.PrintFrozenTypes();
return;
}
ManualConfig config = ManualConfig.Create(DefaultConfig.Instance)
.AddExporter(MarkdownExporter.GitHub)
.AddExporter(HtmlExporter.Default)
.AddExporter(CsvExporter.Default);
Type[] benchmarks =
[
typeof(FrozenLookupBench),
typeof(FrozenCreateBench),
typeof(DictWhyBench),
typeof(DictNoPgoBench),
typeof(FrozenMissBench),
typeof(SwitchRouteBench),
];
BenchmarkSwitcher switcher = BenchmarkSwitcher.FromTypes(benchmarks);
if (args.Length > 0)
{
switcher.Run(args, config);
return;
}
switcher.RunAll(config);
// Все замеры: dotnet run -c Release -f net10.0
// Реализации Frozen: dotnet run -c Release -f net10.0 -- types
// Прогон без PGO: nopgo.bat