Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Kim <[email protected]>
  • Loading branch information
kyle-yh-kim committed Nov 18, 2024
1 parent f610b67 commit f11ff7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion commands/cluster-slot-stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ The following statistics are supported:

## Options

* `ORDERBY` -- Returns an ordered slot statistics based on the specified statistic and sub-arguments to identify hot / cold slots across the cluster. In the event of a tie in the stats, ascending slot number is used as a tie breaker.
* `ORDERBY` -- Returns an ordered slot statistics based on the specified statistic and sub-arguments to identify hot / cold slots across the cluster. Either `ASC` or `DESC` modifiers can be used. In the event of a tie in the stats, ascending slot number is used as a tie breaker.
* `SLOTSRANGE` -- Returns slot statistics based on the slots range provided for pagination. The range is inclusive. The response is ordered in ascending slot number.

## Examples

### Response in RESP2

For `ORDERBY`:
```
> CLUSTER SLOT-STATS ORDERBY KEY-COUNT LIMIT 2 DESC
1) 1) (integer) 12426
Expand All @@ -38,6 +39,8 @@ The following statistics are supported:
7) "network-bytes-out"
8) (integer) 0
```

For `SLOTSRANGE`:
```
> CLUSTER SLOT-STATS SLOTSRANGE 0 1
1) 1) (integer) 0
Expand All @@ -62,6 +65,7 @@ The following statistics are supported:

### Response in RESP3

For `ORDERBY`:
```
> CLUSTER SLOT-STATS ORDERBY KEY-COUNT LIMIT 2 DESC
1) 1) (integer) 12426
Expand All @@ -75,6 +79,8 @@ The following statistics are supported:
3# "network-bytes-in" => (integer) 0
4# "network-bytes-out" => (integer) 0
```

For `SLOTSRANGE`:
```
> CLUSTER SLOT-STATS SLOTSRANGE 0 1
1) 1) (integer) 0
Expand Down
3 changes: 3 additions & 0 deletions resp2_replies.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@
"CLUSTER SLOTS": [
"[Array reply](../topics/protocol.md#arrays): nested list of slot ranges with networking information."
],
"CLUSTER SLOT-STATS": [
"[Array reply](../topics/protocol.md#arrays): nested list of slot usage statistics."
],
"COMMAND": [
"[Array reply](../topics/protocol.md#arrays): a nested list of command details. The order of the commands in the array is random."
],
Expand Down

0 comments on commit f11ff7e

Please sign in to comment.