Skip to content

Commit

Permalink
Ensure histogram sum is correct.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael S. Fischer committed Jun 20, 2011
1 parent 820c6a7 commit bbe9313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/histogram.js
Expand Up @@ -42,7 +42,7 @@ Histogram.prototype.update = function(val, timestamp) {
} else {
this.min = val < this.min ? val : this.min;
}
this.sum += val;
this.sum = (this.sum === null) ? val : this.sum + val;
this.updateVariance(val);
}

Expand Down

0 comments on commit bbe9313

Please sign in to comment.