Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify calculation

  • Loading branch information...
commit ecdc1cdb876deb7d1f4605ed9df42a8f85e2a4e2 1 parent 246fdae
@draco2003 authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/process_metrics.js
View
3  lib/process_metrics.js
@@ -41,8 +41,7 @@ var process_metrics = function (metrics, flushInterval, ts, flushCallback) {
for (key2 in pctThreshold) {
var pct = pctThreshold[key2];
if (count > 1) {
- var thresholdIndex = Math.round(((100 - pct) / 100) * count);
- var numInThreshold = count - thresholdIndex;
+ var numInThreshold = Math.round(pct / 100 * count);
maxAtThreshold = values[numInThreshold - 1];
sum = cumulativeValues[numInThreshold - 1];
Please sign in to comment.
Something went wrong with that request. Please try again.