22using System . Collections . Generic ;
33using System . IO ;
44using System . Linq ;
5+ using BenchmarkDotNet . Engines ;
56using BenchmarkDotNet . Loggers ;
67using BenchmarkDotNet . Properties ;
78using BenchmarkDotNet . Reports ;
@@ -83,7 +84,8 @@ public IEnumerable<string> ExportToFiles(Summary summary, ILogger consoleLogger)
8384 var version = BenchmarkDotNetInfo . Instance . BrandTitle ;
8485 var annotations = GetAnnotations ( version ) ;
8586
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 ) ) ) ) ;
8789
8890 foreach ( var benchmark in summary . Reports . GroupBy ( r => r . BenchmarkCase . Descriptor . Type . Name ) )
8991 {
@@ -93,6 +95,7 @@ public IEnumerable<string> ExportToFiles(Summary summary, ILogger consoleLogger)
9395 var timeStats = from report in benchmark
9496 let jobId = report . BenchmarkCase . DisplayInfo . Replace ( report . BenchmarkCase . Descriptor . DisplayInfo + ": " , string . Empty )
9597 from measurement in report . AllMeasurements
98+ where measurement . Is ( IterationMode . Workload , IterationStage . Result )
9699 let measurementValue = measurement . Nanoseconds / measurement . Operations
97100 group measurementValue / timeScale by ( Target : report . BenchmarkCase . Descriptor . WorkloadMethodDisplayInfo , JobId : jobId ) into g
98101 select ( g . Key . Target , g . Key . JobId , Mean : g . Average ( ) , StdError : StandardError ( g . ToList ( ) ) ) ;
0 commit comments