require 'ganymed/sampler/datasource' module Ganymed class Sampler ## # A Gauge is the simplest DataSource type. It simply records the given # 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 each do |ns, origin, ts| yield ns, origin, ts.values.flatten end end end end end