Returns the cumulative distribution of latencies of a subset or all commands.
LATENCY
HISTOGRAM COMMAND
[COMMAND…]
LATENCY HISTOGRAM returns a cumulative distribution of
commands’ latencies in histogram format.
By default, all available latency histograms are returned. You can filter the reply by providing specific command names.
Each histogram consists of the following fields:
This command requires the extended latency monitoring feature to be
enabled, which is the default. If you need to enable it, call CONFIG SET latency-tracking yes.
To delete the latency histograms’ data use the CONFIG RESETSTAT
command.
Map where each key is a command name, and each value is a map with the total calls, and an inner map of the histogram time buckets.
O(N) where N is the number of commands with latency information being retrieved.
@admin @dangerous @slow
127.0.0.1:6379> LATENCY HISTOGRAM set
1# "set" =>
1# "calls" => (integer) 100000
2# "histogram_usec" =>
1# (integer) 1 => (integer) 99583
2# (integer) 2 => (integer) 99852
3# (integer) 4 => (integer) 99914
4# (integer) 8 => (integer) 99940
5# (integer) 16 => (integer) 99968
6# (integer) 33 => (integer) 100000
ACL, ACL CAT, ACL DELROLE, ACL DELUSER, ACL DIGEST, ACL DRYRUN, ACL GENPASS, ACL GETROLE, ACL GETUSER, ACL HELP, ACL LIST, ACL LOAD, ACL LOG, ACL ROLES, ACL SAVE, ACL SETROLE, ACL SETUSER, ACL USERS, ACL WHOAMI, BGREWRITEAOF, BGSAVE, COMMAND, COMMAND COUNT, COMMAND DOCS, COMMAND GETKEYS, COMMAND GETKEYSANDFLAGS, COMMAND HELP, COMMAND INFO, COMMAND LIST, COMMANDLOG, COMMANDLOG GET, COMMANDLOG HELP, COMMANDLOG LEN, COMMANDLOG RESET, CONFIG, CONFIG GET, CONFIG HELP, CONFIG RESETSTAT, CONFIG REWRITE, CONFIG SET, DBSIZE, DEBUG, FAILOVER, FLUSHALL, FLUSHDB, HOTKEYS, HOTKEYS GET, HOTKEYS HELP, HOTKEYS RESET, INFO, LASTSAVE, LATENCY, LATENCY DOCTOR, LATENCY GRAPH, LATENCY HELP, LATENCY HISTORY, LATENCY LATEST, LATENCY RESET, LOLWUT, MEMORY, MEMORY DOCTOR, MEMORY HELP, MEMORY MALLOC-STATS, MEMORY PURGE, MEMORY STATS, MEMORY USAGE, MODULE, MODULE HELP, MODULE LIST, MODULE LOAD, MODULE LOADEX, MODULE UNLOAD, MONITOR, PSYNC, REPLCONF, REPLICAOF, RESTORE-ASKING, ROLE, SAVE, SHUTDOWN, SLOWLOG, SLOWLOG GET, SLOWLOG HELP, SLOWLOG LEN, SLOWLOG RESET, SWAPDB, SYNC, TIME.