Sha256: 36f0db99773455fdf48b6255af1fbb9750c102e93e2fd6f3132da5402c0fa0fe

Contents?: true

Size: 411 Bytes

Versions: 18

Compression:

Stored size: 411 Bytes

Contents

module PulseMeter
  module Sensor
    module Timelined
      # Counts unique events per interval
      class UniqCounter < Timeline
        def aggregate_event(key, value)
          command_aggregator.sadd(key, value)
        end

        def summarize(key)
          redis.scard(key)
        end

        private
        
        def deflate(value)
          value.to_i
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
pulse_meter_core-0.5.5 lib/pulse_meter/sensor/timelined/uniq_counter.rb
pulse_meter_core-0.5.4 lib/pulse_meter/sensor/timelined/uniq_counter.rb
pulse_meter_core-0.5.3 lib/pulse_meter/sensor/timelined/uniq_counter.rb
pulse_meter_core-0.5.2 lib/pulse_meter/sensor/timelined/uniq_counter.rb
pulse_meter_core-0.5.1 lib/pulse_meter/sensor/timelined/uniq_counter.rb
pulse_meter_core-0.5.0 lib/pulse_meter/sensor/timelined/uniq_counter.rb
pulse_meter_core-0.4.13 lib/pulse_meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.9 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.8 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.7 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.6 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.5 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.4 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.3 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.2 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.1 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.4.0 lib/pulse-meter/sensor/timelined/uniq_counter.rb
pulse-meter-0.3.2 lib/pulse-meter/sensor/timelined/uniq_counter.rb