зеркало из https://github.com/microsoft/statsd.git
make histograms work with the graphite backend
This commit is contained in:
Родитель
3feedf2a44
Коммит
f0a9361c2d
|
@ -117,10 +117,11 @@ var flush_stats = function graphite_flush(ts, metrics) {
|
|||
var namespace = timerNamespace.concat(key);
|
||||
var the_key = namespace.join(".");
|
||||
|
||||
if (typeof(timer_data_key) === 'string') {
|
||||
if (typeof(timer_data[key][timer_data_key]) === 'number') {
|
||||
statString += the_key + '.' + timer_data_key + ' ' + timer_data[key][timer_data_key] + ts_suffix;
|
||||
} else {
|
||||
for (timer_data_sub_key in timer_data[key][timer_data_key]) {
|
||||
l.log(timer_data[key][timer_data_key][timer_data_sub_key].toString());
|
||||
statString += the_key + '.' + timer_data_key + '.' + timer_data_sub_key + ' ' +
|
||||
timer_data[key][timer_data_key][timer_data_sub_key] + ts_suffix;
|
||||
}
|
||||
|
|
4
stats.js
4
stats.js
|
@ -54,7 +54,7 @@ function flushMetrics() {
|
|||
counter_rates: counter_rates,
|
||||
timer_data: timer_data,
|
||||
pctThreshold: pctThreshold,
|
||||
histogram: config.histogram
|
||||
histogram: conf.histogram
|
||||
}
|
||||
|
||||
// After all listeners, reset the stats
|
||||
|
@ -124,7 +124,7 @@ config.configFile(process.argv[2], function (config, oldConfig) {
|
|||
bad_lines_seen = prefixStats + ".bad_lines_seen";
|
||||
packets_received = prefixStats + ".packets_received";
|
||||
|
||||
//now set to zero so we can increment them
|
||||
//now set to zero so we can increment them
|
||||
counters[bad_lines_seen] = 0;
|
||||
counters[packets_received] = 0;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче