Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

LATENCY LATEST

Last updated
LATENCY LATEST
Group
Server
Complexity
O(N) where N is the number of events
Arity
2 (exactly, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

LATENCY LATEST gives one line per event that has had a latency spike since the monitor started or was last reset: when the latest spike happened, how long it took, and the worst spike ever recorded for that event. Spikes are only recorded while latency-monitor-threshold is above 0; see LATENCY.

An array with one entry per event, in RESP2 and RESP3. Each entry is an array of four elements:

  1. The event name, a bulk string (command, fast-command, expire-cycle).
  2. The Unix time, in seconds, of the latest spike.
  3. The latest spike’s duration in milliseconds.
  4. The worst spike’s duration in milliseconds.

An empty array when nothing has been recorded.

127.0.0.1:6379> LATENCY LATEST
1) 1) "command"
2) (integer) 1790000000
3) (integer) 120
4) (integer) 340
2) 1) "expire-cycle"
2) (integer) 1789999420
3) (integer) 55
4) (integer) 55

Same reply shape as Redis 7 and Valkey 8.

LATENCY HISTORY, LATENCY DOCTOR, LATENCY RESET