From db4b77b114c2f5253bec7423503ba2b9fa82f693 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Thu, 26 Mar 2026 07:42:26 -0700 Subject: [PATCH] DEV: update various metrics --- content/commands/client-list.md | 6 +++++- content/commands/info.md | 30 +++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/content/commands/client-list.md b/content/commands/client-list.md index 7fb08198ea..08126e00b4 100644 --- a/content/commands/client-list.md +++ b/content/commands/client-list.md @@ -124,10 +124,14 @@ Here is the meaning of the fields: * `rbs`: current size of the client's read buffer in bytes. Added in Redis 7.0. * `lib-name` - the name of the client library that is being used. * `lib-ver` - the version of the client library. -* `io-thread`: id of I/O thread assigned to the client. Added in Redis 8.0 +* `io-thread`: id of I/O thread assigned to the client. Added in Redis 8.0. * `tot-net-in`: total network input bytes read from this client. * `tot-net-out`: total network output bytes sent to this client. * `tot-cmds`: total count of commands this client executed. +* `read-events`: number of `readQueryFromClient()` calls for this client. Added in Redis 8.8 +* `avg-pipeline-len-sum`: cumulative sum of commands parsed per batch. Added in Redis 8.8 +* `avg-pipeline-len-cnt`: number of parse batches. Added in Redis 8.8 + The client flags can be a combination of: diff --git a/content/commands/info.md b/content/commands/info.md index a479dd20af..a62e018974 100644 --- a/content/commands/info.md +++ b/content/commands/info.md @@ -393,6 +393,14 @@ Here is the meaning of all fields in the **stats** section: * `acl_access_denied_channel`: Number of commands rejected because of access denied to a channel * `acl_access_denied_tls_cert`: Number of failed TLS certificate–based authentication attempts * `cluster_incompatible_ops`: Number of cluster-incompatible commands. This metric appears only if the `cluster-compatibility-sample-ratio` configuration parameter is not 0. Added in Redis 8.0. +* `slowlog_commands_count`: commands written to slowlog [1](#list-note-1) +* `slowlog_commands_time_ms_sum`: sum of execution times of commands from the slowlog [1](#list-note-1) +* `slowlog_commands_time_ms_max`: maximum execution time of a command from the slowlog [1](#list-note-1) +* `total_client_processing_events`: total `processInputBuffer()` calls [1](#list-note-1) +* `eventloop_cycles_with_clients_processing`: event loop cycles where client input buffers were processed [1](#list-note-1) +* `avg_pipeline_length_sum`, `avg_pipeline_length_cnt`, `avg_pipeline_length`: global pipeline depth aggregates [1](#list-note-1) + +1. Added in Redis 8.8 Here is the meaning of all fields in the **replication** section: @@ -464,16 +472,24 @@ Here is the meaning of all fields in the **cpu** section: * `used_cpu_sys_main_thread`: System CPU consumed by the Redis server main thread * `used_cpu_user_main_thread`: User CPU consumed by the Redis server main thread -The **commandstats** section provides statistics based on the command type, - including the number of calls that reached command execution (not rejected), - the total CPU time consumed by these commands, the average CPU consumed - per command execution, the number of rejected calls - (errors prior command execution), and the number of failed calls - (errors within the command execution). +The **commandstats** section provides statistics based on the command type: + +- `calls` - the number of calls that reached command execution +- `usec` - the total CPU time consumed by these commands +- `usec_per_call` - the average CPU consumed per command execution +- `rejected_calls` - the number of rejected calls +- `failed_calls` - the number of failed calls + + For commands that are logged to the slowlog, the following statistics are also reported (added in Redis 8.8): + +- `slowlog_count` - number of times the command was written in the slowlog +- `slowlog_time_ms_sum` - sum of execution time of the command (only from the slowlog) +- `slowlog_time_ms_max` - maximum execution time of the command (only from the slowlog) For each command type, the following line is added: -* `cmdstat_XXX`: `calls=XXX,usec=XXX,usec_per_call=XXX,rejected_calls=XXX,failed_calls=XXX` +* `cmdstat_XXX`:`calls=XXX,usec=XXX,usec_per_call=XXX,rejected_calls=XXX,failed_calls=XXX,` + `slowlog_count=XXX,slowlog_time_ms_sum=XXX,slowlog_time_ms_max=XXX` The **latencystats** section provides latency percentile distribution statistics based on the command type.