Sha256: f0c5b15ffbfb5a27ae6ab4c2d59485ed138e5f779381ba70ee8bec0fc2120c77
Contents?: true
Size: 374 Bytes
Versions: 15
Compression:
Stored size: 374 Bytes
Contents
module PulseMeter module Sensor module Timelined # Calculates max value in interval class Max < ZSetBased def update(key) command_aggregator.zremrangebyrank(key, 0, -2) end def calculate(key, _) max_el = redis.zrange(key, -1, -1)[0] redis.zscore(key, max_el) end end end end end
Version data entries
15 entries across 15 versions & 2 rubygems