Permalink
Browse files

Use counter_rates in graphite backent

  • Loading branch information...
1 parent a0aac23 commit d727054d0413e16b1e709d5b86cf592ca39586fb @draco2003 draco2003 committed Dec 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 backends/graphite.js
@@ -85,7 +85,7 @@ var flush_stats = function graphite_flush(ts, metrics) {
for (key in counters) {
var namespace = counterNamespace.concat(key);
var value = counters[key];
- var valuePerSecond = value / (flushInterval / 1000); // calculate "per second" rate
+ var valuePerSecond = counter_rates[key]; // pre-calculated "per second" rate
if (legacyNamespace === true) {
statString += namespace.join(".") + ' ' + valuePerSecond + ts_suffix;

0 comments on commit d727054

Please sign in to comment.