Add sets support in the console backend.

The backend dumps all values stored in all the buckets being sets.

This allows easy debugging by showing all values that are stored in
each bucket.
This commit is contained in:
Vivien Barousse 2012-08-08 23:09:56 +01:00
Родитель ea39ca6242
Коммит 159b4c2641
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -34,6 +34,13 @@ ConsoleBackend.prototype.flush = function(timestamp, metrics) {
counter: this.statsCache.counters,
timers: this.statsCache.timers,
gauges: metrics.gauges,
sets: function (vals) {
var ret = {};
for (val in vals) {
ret[val] = vals[val].values();
}
return ret;
}(metrics.sets),
pctThreshold: metrics.pctThreshold
};