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 HISTOGRAM

Last updated
LATENCY HISTOGRAM [command [command ...]]
Group
Server
Complexity
O(N) where N is the number of commands reported
Arity
-2 (at least 2 words, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

LATENCY HISTOGRAM returns how long each command has taken, as a histogram. Name commands (case-insensitive, with subcommands written as config|get) to get only those, or name none to get every command that has run. Commands that have not run since the start or the last CONFIG RESETSTAT, and unknown names, are left out. The data is collected while latency-tracking is yes, the default.

Buckets are powers of two microseconds (1, 2, 4, 8, …). Each bucket’s count is cumulative: the number of calls that took at most that long. Only buckets where the count grows are listed.

A map from command name to a map with two fields, in RESP3; nested flat arrays of name and value pairs in RESP2:

Field Value
calls Number of calls measured.
histogram_usec Map from bucket upper bound (microseconds) to cumulative call count.
127.0.0.1:6379> LATENCY HISTOGRAM get set
1) "get"
2) 1) "calls"
2) (integer) 15020
3) "histogram_usec"
4) 1) (integer) 2
2) (integer) 12650
3) (integer) 4
4) (integer) 14995
5) (integer) 16
6) (integer) 15020
3) "set"
4) 1) "calls"
2) (integer) 300
3) "histogram_usec"
4) 1) (integer) 4
2) (integer) 298
3) (integer) 8
4) (integer) 300

Same reply shape as Redis 7 and Valkey 8.

INFO (latencystats and commandstats), LATENCY, CONFIG RESETSTAT