1
1
// Copyright (c) Toni Solarin-Sodara
2
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
4
+ //using System.Diagnostics.Tracing;
4
5
using BenchmarkDotNet . Configs ;
5
6
using BenchmarkDotNet . Diagnosers ;
7
+ //using BenchmarkDotNet.Diagnostics.Windows;
6
8
using BenchmarkDotNet . Exporters ;
7
9
using BenchmarkDotNet . Exporters . Csv ;
8
10
using BenchmarkDotNet . Exporters . Json ;
9
11
using BenchmarkDotNet . Exporters . Xml ;
10
12
using BenchmarkDotNet . Jobs ;
11
13
using BenchmarkDotNet . Running ;
12
14
using BenchmarkDotNet . Toolchains . InProcess . NoEmit ;
15
+ //using Microsoft.Diagnostics.NETCore.Client;
16
+ //using Microsoft.Diagnostics.Tracing.Parsers;
13
17
14
18
namespace coverlet . core . benchmark . tests
15
19
{
@@ -18,25 +22,21 @@ public class Program
18
22
19
23
public static void Main ( string [ ] args )
20
24
{
21
-
22
25
var config = DefaultConfig . Instance
23
26
. WithOptions ( ConfigOptions . JoinSummary )
24
27
. AddJob ( Job
25
28
. ShortRun
26
29
. WithLaunchCount ( 1 )
27
30
. WithToolchain ( InProcessNoEmitToolchain . Instance ) )
28
- . AddExporter ( CsvExporter . Default )
29
- . AddExporter ( CsvMeasurementsExporter . Default )
30
- . AddExporter ( RPlotExporter . Default )
31
- . AddExporter ( HtmlExporter . Default )
32
- . AddExporter ( MarkdownExporter . GitHub )
33
- . AddExporter ( JsonExporter . Default )
34
- . AddExporter ( XmlExporter . Default )
35
- . AddDiagnoser ( MemoryDiagnoser . Default )
31
+ . AddExporter ( CsvExporter . Default , CsvMeasurementsExporter . Default , RPlotExporter . Default , HtmlExporter . Default , JsonExporter . Default , MarkdownExporter . GitHub , XmlExporter . Default )
32
+ . AddDiagnoser ( MemoryDiagnoser . Default , ThreadingDiagnoser . Default , ExceptionDiagnoser . Default )
33
+ //.AddDiagnoser(new InliningDiagnoser(), new EtwProfiler()) // only windows platform, requires elevated privileges
34
+ //.AddDiagnoser(new EventPipeProfiler(EventPipeProfile.CpuSampling)) // stops collecting results ???
36
35
;
37
36
var summary = BenchmarkRunner . Run ( new [ ] {
38
37
BenchmarkConverter . TypeToBenchmarks ( typeof ( CoverageBenchmarks ) , config ) ,
39
- BenchmarkConverter . TypeToBenchmarks ( typeof ( InstrumenterBenchmarks ) , config )
38
+ BenchmarkConverter . TypeToBenchmarks ( typeof ( InstrumenterBenchmarks ) , config ) ,
39
+ BenchmarkConverter . TypeToBenchmarks ( typeof ( InstrumentationHelperBenchmarks ) , config ) ,
40
40
} ) ;
41
41
42
42
// Use this to select benchmarks from the console and execute with additional options e.g. 'coverlet.core.benchmark.tests.exe --profiler EP'
0 commit comments