Skip to content

Commit

Permalink
Minor revision.
Browse files Browse the repository at this point in the history
- Added RESP3 response.

Signed-off-by: Kyle Kim <kimkyle@amazon.com>
  • Loading branch information
kyle-yh-kim committed Jun 27, 2024
1 parent c4f0775 commit 3625f09
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions commands/cluster-slot-stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Returns slot statistics based on the slots range provided. The range is inclusiv
The `SLOTSRANGE` argument allows for request pagination.
The response is ordered in ascending slot number.

##### Response in RESP2
```
> CLUSTER SLOT-STATS SLOTSRANGE 0 2
1) 1) (integer) 0
Expand All @@ -25,11 +26,24 @@ The response is ordered in ascending slot number.
2) (integer) 0
```

##### Response in RESP3
```
> CLUSTER SLOT-STATS SLOTSRANGE 0 2
1) 1) (integer) 0
2) 1# "key-count" => (integer) 0
2) 1) (integer) 1
2) 1# "key-count" => (integer) 0
3) 1) (integer) 2
2) 1# "key-count" => (integer) 0
```

### ORDERBY
Orders slot statistics based on the provided metric. Right now, only `key-count` is available.
The `ORDERBY` argument allows for the user to identify hot / cold slots across the cluster.
The response is ordered based on sort result.


##### Response in RESP2
```
> CLUSTER SLOT-STATS ORDERBY KEY-COUNT LIMIT 3 DESC
1) 1) (integer) 12426
Expand All @@ -41,4 +55,15 @@ The response is ordered based on sort result.
3) 1) (integer) 2704
2) 1) "key-count"
2) (integer) 11
```

##### Response in RESP3
```
> CLUSTER SLOT-STATS ORDERBY KEY-COUNT LIMIT 3 DESC
1) 1) (integer) 12426
2) 1# "key-count" => (integer) 45
2) 1) (integer) 13902
2) 1# "key-count" => (integer) 20
3) 1) (integer) 2704
2) 1# "key-count" => (integer) 11
```

0 comments on commit 3625f09

Please sign in to comment.