2
2
using System . Collections . Generic ;
3
3
using System . IO ;
4
4
using System . Linq ;
5
+ using BenchmarkDotNet . Engines ;
5
6
using BenchmarkDotNet . Loggers ;
6
7
using BenchmarkDotNet . Properties ;
7
8
using BenchmarkDotNet . Reports ;
@@ -83,7 +84,8 @@ public IEnumerable<string> ExportToFiles(Summary summary, ILogger consoleLogger)
83
84
var version = BenchmarkDotNetInfo . Instance . BrandTitle ;
84
85
var annotations = GetAnnotations ( version ) ;
85
86
86
- var ( timeUnit , timeScale ) = GetTimeUnit ( summary . Reports . SelectMany ( m => m . AllMeasurements ) ) ;
87
+ var ( timeUnit , timeScale ) = GetTimeUnit ( summary . Reports
88
+ . SelectMany ( m => m . AllMeasurements . Where ( m => m . Is ( IterationMode . Workload , IterationStage . Result ) ) ) ) ;
87
89
88
90
foreach ( var benchmark in summary . Reports . GroupBy ( r => r . BenchmarkCase . Descriptor . Type . Name ) )
89
91
{
@@ -93,6 +95,7 @@ public IEnumerable<string> ExportToFiles(Summary summary, ILogger consoleLogger)
93
95
var timeStats = from report in benchmark
94
96
let jobId = report . BenchmarkCase . DisplayInfo . Replace ( report . BenchmarkCase . Descriptor . DisplayInfo + ": " , string . Empty )
95
97
from measurement in report . AllMeasurements
98
+ where measurement . Is ( IterationMode . Workload , IterationStage . Result )
96
99
let measurementValue = measurement . Nanoseconds / measurement . Operations
97
100
group measurementValue / timeScale by ( Target : report . BenchmarkCase . Descriptor . WorkloadMethodDisplayInfo , JobId : jobId ) into g
98
101
select ( g . Key . Target , g . Key . JobId , Mean : g . Average ( ) , StdError : StandardError ( g . ToList ( ) ) ) ;
0 commit comments