-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
30 lines (24 loc) · 1.31 KB
/
Copy pathProgram.cs
File metadata and controls
30 lines (24 loc) · 1.31 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
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Exporters.Csv;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
using BoundsCheckProof.Benchmarks;
using BoundsCheckProof.Reporting;
ManualConfig config = ManualConfig.Create(DefaultConfig.Instance)
.AddExporter(MarkdownExporter.GitHub)
.AddExporter(HtmlExporter.Default)
.AddExporter(CsvExporter.Default);
Summary[] summaries = BenchmarkRunner.Run([typeof(BoundsCheckBench)], config);
// dotnet run -c Release -f net10.0
//
// .NET 11 здесь НЕ гоняем: стабильный BenchmarkDotNet 0.15.8 его пока не
// собирает (dotnet/BenchmarkDotNet#3017). Исчезновение проверки на .NET 11
// доказываем дизасмом - папка Disasm, там BenchmarkDotNet не нужен вообще.
List<Row> rows = BenchmarkResultCollector.Collect(summaries);
string resultsDir = BenchmarkResultCollector.GetResultsDirectory(summaries);
string recapPath = RecapReport.WriteAndPrint(rows, resultsDir);
string chartsPath = ChartsReport.Write(rows, resultsDir);
Console.WriteLine($"Сводка: {recapPath}");
Console.WriteLine($"Графики: {chartsPath}");
Console.WriteLine($"Таблицы: {resultsDir} (*-report-github.md - готовые для статьи)");