Sha256: 2c28c93616e6ea82d20213ff080b66541d0c13bcdcd553828bc8ce28e2124744

Contents?: true

Size: 311 Bytes

Versions: 22

Compression:

Stored size: 311 Bytes

Contents

module PulseMeter
  module Sensor
    module Timelined
      # Counts events per interval
      class Counter < Timeline
        def aggregate_event(key, value)
          redis.incrby(key, value.to_i)
        end

        def summarize(key)
          redis.get(key).to_i
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
pulse-meter-0.2.3 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.2.2 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.2.1 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.2.0 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-client-backport-0.1.4 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.11 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-client-backport-0.1.3 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.10 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-client-backport-0.1.2 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.9 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-client-backport-0.1.1 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.8 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.7 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.6 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.5 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.4 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.3 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.2 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-0.1.1 lib/pulse-meter/sensor/timelined/counter.rb
pulse-meter-client-backport-0.1.0 lib/pulse-meter/sensor/timelined/counter.rb