LATENCY HISTORY
LATENCY HISTORY event
- Group
- Server
- Complexity
- O(N) where N is the number of spikes recorded for the event
- Arity
- 3 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
LATENCY HISTORY returns the spikes recorded for one event, oldest first.
Each event keeps its most recent 160 spikes. The event name is
case-sensitive: use it exactly as LATENCY LATEST
shows it.
Return value
Section titled “Return value”An array of [unix-time, milliseconds] pairs (two integers each), in RESP2
and RESP3. An event with no spikes, or an unknown name, gives an empty array.
Any number of arguments other than one event gets
ERR wrong number of arguments for 'latency|history' command.
Examples
Section titled “Examples”127.0.0.1:6379> LATENCY HISTORY command1) 1) (integer) 1789999800 2) (integer) 752) 1) (integer) 1790000000 2) (integer) 120Compatibility
Section titled “Compatibility”Same reply shape as Redis 7 and Valkey 8.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.