Skip to content

Commit

Permalink
Use Median instead of Mean for overhead calculations, fixes #1116
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyAkinshin committed Mar 28, 2019
1 parent 52eca7a commit d9901ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Engines/RunResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public RunResults([CanBeNull] IReadOnlyList<Measurement> overhead,

public IEnumerable<Measurement> GetMeasurements()
{
double overhead = Overhead == null ? 0.0 : new Statistics(Overhead.Select(m => m.Nanoseconds)).Mean;
double overhead = Overhead == null ? 0.0 : new Statistics(Overhead.Select(m => m.Nanoseconds)).Median;
var mainStats = new Statistics(Workload.Select(m => m.Nanoseconds));
int resultIndex = 0;
foreach (var measurement in Workload)
Expand Down

1 comment on commit d9901ba

@adamsitnik
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndreyAkinshin the build is red, but it's due to dotnet/corert#7226 I hope it will be fixed on MyGet side soon

Please sign in to comment.