UNPKG

librato-node

Version:

A node.js client for Librato Metrics (http://metrics.librato.com/)

48 lines (35 loc) 1.26 kB
// Generated by CoffeeScript 1.12.7 (function() { var Aggregator, Collector, CounterCache, slice = [].slice; CounterCache = require('./counter_cache'); Aggregator = require('./aggregator'); Collector = (function() { function Collector() { this.counters = new CounterCache(); this.aggregate = new Aggregator(); } Collector.prototype.increment = function() { var args, ref; args = 1 <= arguments.length ? slice.call(arguments, 0) : []; return (ref = this.counters).increment.apply(ref, args); }; Collector.prototype.measure = function() { var args, ref; args = 1 <= arguments.length ? slice.call(arguments, 0) : []; return (ref = this.aggregate).measure.apply(ref, args); }; Collector.prototype.timing = function() { var args, ref; args = 1 <= arguments.length ? slice.call(arguments, 0) : []; return (ref = this.aggregate).timing.apply(ref, args); }; Collector.prototype.flushTo = function(counterQueue, aggregateQueue) { this.counters.flushTo(counterQueue); return this.aggregate.flushTo(aggregateQueue); }; return Collector; })(); module.exports = Collector; }).call(this); //# sourceMappingURL=collector.js.map