Skip to content
Browse files

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.
  • Loading branch information...
1 parent ea39ca6 commit 159b4c264120313d922dfe9177f4653ea5b3ca4a @VivienBarousse VivienBarousse committed
Showing with 7 additions and 0 deletions.
  1. +7 −0 backends/console.js
View
7 backends/console.js
@@ -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
};

0 comments on commit 159b4c2

Please sign in to comment.
Something went wrong with that request. Please try again.