require 'ganymed/ext/array' require 'ganymed/sampler/datasource' module Ganymed class Sampler ## # A Counter {DataSource} processes samples counting a specific event (such # as a webserver request, user login, etc) and produces a rate/s gauge. # class Counter < DataSource def flush each do |ns, origin, ts| yield ns, origin, ts.values.map(&:sum) end end end end end