Skip to content

Commit

Permalink
chore: sort before getpercentile
Browse files Browse the repository at this point in the history
  • Loading branch information
guitarrapc committed Aug 13, 2024
1 parent 13df030 commit 028bb76
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ Latency MeasureLatency()
var latencyMean = (totalCount != 0) ? totalSum / totalCount : totalSum;
var latencyAllConnection = new List<double>(totalCount);
foreach (var connections in latencyPerConnection) latencyAllConnection.AddRange(connections);
// sort before get percentile
latencyAllConnection.Sort();

var latency50p = GetPercentile(50, latencyAllConnection);
var latency75p = GetPercentile(75, latencyAllConnection);
var latency90p = GetPercentile(90, latencyAllConnection);
Expand Down

0 comments on commit 028bb76

Please sign in to comment.