Time series
Time series with retention, compaction rules, labels, and queries across many series at once (TS.*).
TS.ADD: Adds a sample to the time series at key: timestamp in milliseconds, or * for the server's clock, and value, a floating-point number or NaN.TS.ALTER: Changes the settings of an existing time series: its retention, chunk size, duplicate policy or labels.TS.CREATE: Creates a time series at key: samples, each a timestamp in milliseconds and a floating-point value, kept in timestamp order.TS.CREATERULE: Creates a compaction rule: every sample added to sourceKey is aggregated, by agg over buckets of bucketDuration milliseconds, into the existing series destKey.TS.DECRBY: Adds a sample whose value is the series' last value minus value, for counters that go down: stock left, open slots, a balance.TS.DEL: Deletes the samples of the time series at key from fromTimestamp to toTimestamp, both included, and returns how many there were.TS.DELETERULE: Deletes the compaction rule from sourceKey to destKey that TS.CREATERULE made.TS.GET: Returns the newest sample of the time series at key.TS.INCRBY: Adds a sample whose value is the series' last value plus value; a missing series starts at 0.TS.INFO: Returns a time series' metadata: its number of samples, memory use, first and last timestamps, retention, chunk size, duplicate policy, labels, the series it is compacted from (sourceKey, nil if none…TS.MADD: Adds samples to one or more time series in one call, creating series that do not exist.TS.MGET: Returns the newest sample of every time series whose labels match the FILTER (see TS.MRANGE for conditions).TS.MRANGE: Runs TS.RANGE over every time series whose labels match the FILTER, and returns each with its samples.TS.MREVRANGE: Runs TS.REVRANGE over every time series whose labels match the FILTER, and returns each with its samples, newest first.TS.NRANGE: Runs the same range over several named time series and joins the results by timestamp, a command of Redis 8.10.TS.NREVRANGE: Runs the same range over several named time series and joins the results by timestamp, newest first.TS.QUERYINDEX: Returns the keys of every time series whose labels match all the given conditions, sorted by key.TS.QUERYLABELS: Returns the label names in use, with LABELS, or the values of one label, with VALUES label, across the time series that match the FILTER conditions, or all of them (Redis 8.10).TS.RANGE: Returns the samples of the time series at key from fromTimestamp to toTimestamp, both included, oldest first.TS.READ: Returns the samples of the time series at key at or after timestamp, oldest first, for following a series as it grows (Redis 8.10).TS.REVRANGE: Returns the samples of the time series at key from fromTimestamp to toTimestamp, both included, newest first.