lib/ganymed/sampler/gauge.rb in ganymed-0.2.3 vs lib/ganymed/sampler/gauge.rb in ganymed-0.3.0

- old
+ new

@@ -8,17 +8,13 @@ # value in the buffer and emits all values in the buffer upon flush # assuming the given values are in gauge-style (e.g. free memory, users # currently logged in, etc). # class Gauge < DataSource - def flush(tick, &block) - each(tick) do |ns, origin, values| - yield ns, origin, values + def flush + each do |ns, origin, ts| + yield ns, origin, ts.values.flatten end - end - - def feed(ns, origin, ts, value) - add(ns, origin, value) end end end end