Sha256: d0df1175f6962e0362806f1e37e74e23282640f07bdb28de81dcb2ba4d47315f
Contents?: true
Size: 645 Bytes
Versions: 8
Compression:
Stored size: 645 Bytes
Contents
module PulseMeter module Sensor module Timelined # Calculates min value in interval class ZSetBased < Timeline def update(_) end def calculate(key) 0 end def aggregate_event(key, value) command_aggregator.zadd(key, value, "#{value}::#{uniqid}") update(key) end def summarize(key) count = redis.zcard(key) if count > 0 calculate(key, count) else nil end end private def deflate(value) value.to_f end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems