Skip to content

Commit 2450411

Browse files
committed
simplify output of benchmark
1 parent 906a66e commit 2450411

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Source/Tests/Plugins/PluginTests.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -535,19 +535,13 @@ public void ViewPriority() {
535535
public void RunBenchmark() {
536536
var summary = BenchmarkRunner.Run<DeduplicationBenchmarks>();
537537

538-
Action<string> writeBoth = line => {
539-
_writer.WriteLine(line);
540-
Console.WriteLine(line);
541-
};
542-
543538
foreach (var benchmark in summary.Benchmarks) {
544539
var report = summary.Reports[benchmark];
545540

546-
writeBoth(report.ToString());
547-
}
541+
_writer.WriteLine(report.ToString());
548542

549-
foreach (var line in summary.Table.FullContentWithHeader) {
550-
writeBoth(string.Join("\t", line));
543+
var benchmarkMedianMilliseconds = report.ResultStatistics.Median / 1000000;
544+
_writer.WriteLine($"{benchmark.ShortInfo} - {benchmarkMedianMilliseconds:0.00}ms");
551545
}
552546
}
553547

0 commit comments

Comments
 (0)