lib/redismetrics/client.rb
# Reads the range of entries from timestamp +from+ to timestamp +to+ (given
# as Time objects) and return it as an enum consisting of Time and value
# pairs. If a conversion method is defined as +convert+ apply it to the each
# entry pair.
Reads the range of entries from timestamp +from+ to timestamp +to+ (given
as Time objects) and return it as an enum consisting of Time and value
pairs. If a conversion method is defined as +convert+ apply it to the each
entry pair.
Reads the range of entries from timestamp + from + to timestamp + to + ( given as Time objects ) and return it as an enum consisting of Time and value pairs . If a conversion method is defined as + convert + apply it to the each entry pair .
def read(key:, from: nil, to: nil, convert: nil)
    range = @redis.ts_range(
      key:  key,
      from: from ? (from.to_f * MS).floor : ?-,
      to:   to ? (to.to_f * MS).ceil : ?+
    ).lazy.to_enum
    apply_conversion(convert, range)
  end
def read ( key : , from : nil , to : nil , convert : nil ) range = @redis . ts_range ( key : key , from : from ? ( from . to_f * MS ) . floor : ?- , to : to ? ( to . to_f * MS ) . ceil : ?+ ) . lazy . to_enum apply_conversion ( convert , range ) end
Reads the range of entries from timestamp +from+ to timestamp +to+ (given
as Time objects) and return it as an enum consisting of Time and value
pairs.
Reads the range of entries from timestamp + from + to timestamp + to + ( given as Time objects ) and return it as an enum consisting of Time and value pairs .
key
from
to
convert