TS.INFO
TS.INFO key
- Group
- Time series
- Complexity
- O(L), L being the labels
- Arity
- 2 (exactly, counting the command name)
- Flags
- read-only, fast
- Keys
- first 1, last 1, step 1
- HotKV Cloud
- Performance and Scale
- On-Premise
- requires the time-series license feature
TS.INFO describes the time series key.
Fields
Section titled “Fields”| Field | Meaning |
|---|---|
key |
The series name. |
totalSamples |
Samples ever added, including those retention has since dropped. |
firstTimestamp |
Timestamp of the oldest sample kept (0 before the first sample). |
lastTimestamp |
Timestamp of the latest sample (0 before the first sample). |
lastValue |
Value of the latest sample, with six decimals. |
retentionMs |
The retention period, 0 for none. |
memoryBytes |
Memory taken by the samples kept. |
labels |
Array of [label, value] pairs. |
rules |
Number of TS.DOWNSAMPLE rules with this series as the source. |
Return value
Section titled “Return value”A flat array of 18 elements: each field name (bulk string) followed by its value. The shape is the same in RESP2 and RESP3.
Error replies: ERR series not found, and NOLICENSE ... without the
time-series license feature.
Examples
Section titled “Examples”127.0.0.1:6379> TS.CREATE temp:kitchen LABELS room kitchenOK127.0.0.1:6379> TS.ADD temp:kitchen 1700000000000 21.5(integer) 1700000000000127.0.0.1:6379> TS.ADD temp:kitchen 1700000060000 22(integer) 1700000060000127.0.0.1:6379> TS.INFO temp:kitchen 1) "key" 2) "temp:kitchen" 3) "totalSamples" 4) (integer) 2 5) "firstTimestamp" 6) (integer) 1700000000000 7) "lastTimestamp" 8) (integer) 1700000060000 9) "lastValue"10) "22.000000"11) "retentionMs"12) (integer) 013) "memoryBytes"14) (integer) 3215) "labels"16) 1) 1) "room" 2) "kitchen"17) "rules"18) (integer) 0Compatibility
Section titled “Compatibility”HotKV’s own time series API. TS.INFO shares its name with the
RedisTimeSeries command, but reports a different set of fields.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.