Skip to content

Commit

Permalink
Properly calculate median given an even number of values in stress.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
halter73 committed Jul 2, 2013
1 parent 078966e commit 92a5919
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.AspNet.SignalR.Stress/RunBase.cs
Expand Up @@ -249,7 +249,7 @@ protected void RecordAggregates(string key, long[] values)
double median = values[values.Length / 2];
if (values.Length % 2 == 0)
{
median = median + values[(values.Length / 2) - 1] / 2;
median = (median + values[(values.Length / 2) - 1]) / 2;
}

var sum = values.Select(i => new BigInteger(i)).Aggregate((aggregate, bi) => aggregate + bi);
Expand Down

0 comments on commit 92a5919

Please sign in to comment.