Sha256: ac4d6559630c570d3b95c7e00e8562258fddb679150e3db117b562cf450ed6bd

Contents?: true

Size: 372 Bytes

Versions: 15

Compression:

Stored size: 372 Bytes

Contents

module PulseMeter
  module Sensor
    module Timelined
      # Calculates min value in interval
      class Min < ZSetBased

        def update(key)
          command_aggregator.zremrangebyrank(key, 1, -1)
        end

        def calculate(key, _)
          min_el = redis.zrange(key, 0, 0)[0]
          redis.zscore(key, min_el)
        end

      end
    end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

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