Introduce CLUSTER SLOT-STATS command, key-count metic#351
Introduce CLUSTER SLOT-STATS command, key-count metic#351madolson merged 11 commits intovalkey-io:unstablefrom
Conversation
|
Run: To fix the DCO complaint. |
The command provides detailed slot usage statistics upon invocation, with initial support for key-count metric. cpu-usec (approved) and memory-bytes (pending-approval) metrics will soon follow after the merger of this PR. Signed-off-by: Kyle Kim <kimkyle@amazon.com>
605c923 to
e17019b
Compare
|
Thanks for sharing. Two changes added;
|
|
@PingXie I think you asked for this in the past, you should also take a look if you have time. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #351 +/- ##
============================================
+ Coverage 70.05% 70.12% +0.06%
============================================
Files 110 111 +1
Lines 60084 60203 +119
============================================
+ Hits 42094 42218 +124
+ Misses 17990 17985 -5
|
madolson
left a comment
There was a problem hiding this comment.
I remember most of this, and it still mostly LGTM.
|
Review this during a separate meeting.
Still need alignment about the command arguments. Will have separate approval for that. |
- Renamed cluster_slots.c to cluster_slot_stats.c - Renamed function signature and variables. - Removed 0 argument support. Signed-off-by: Kyle Kim <kimkyle@amazon.com>
|
I've cut a 2nd revision, which includes;
@PingXie @madolson |
- Update reply_schema. Signed-off-by: Kyle Kim <kimkyle@amazon.com>
|
@kyle-yh-kim Can you do a git merge and resolve the conflicts. Also please open a PR like valkey-io/valkey-doc#143 to add documentation for it. |
Signed-off-by: Kyle Kim <kimkyle@amazon.com>
- Fixed origin/unstable merge conflicts. - Updated formatting. - Updated cluster-slot-stats.json. Signed-off-by: Kyle Kim <kimkyle@amazon.com>
- Valkey PR link; valkey-io/valkey#351. Signed-off-by: Kyle Kim <kimkyle@amazon.com>
- Valkey PR link; valkey-io/valkey#351. Signed-off-by: Kyle Kim <kimkyle@amazon.com>
|
PR for Valkey-doc has been opened; valkey-io/valkey-doc#150 |
- Valkey PR link; valkey-io/valkey#351. Signed-off-by: Kyle Kim <kimkyle@amazon.com>
- Updated RESP reply from map to array. - Renamed slotStatEntry to slotStatForSort. Signed-off-by: Kyle Kim <kimkyle@amazon.com>
2a8c171 to
12730f0
Compare
- Updated the RESP3 response from array of maps to array of arrays. Signed-off-by: Kyle Kim <kimkyle@amazon.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
Docs for CLUSTER SLOT-STATS, with key-count, cpu-usec, network-bytes-in, and network-bytes-out metrics. - valkey-io/valkey#351 - valkey-io/valkey#712 - valkey-io/valkey#720 --------- Signed-off-by: Kyle Kim <kimkyle@amazon.com> Signed-off-by: Madelyn Olson <madelyneolson@gmail.com> Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Madelyn Olson <madelyneolson@gmail.com> Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Add CLUSTER SLOT-STATS command for key count, cpu time and
network IO per slot currently.
The command has the following syntax
CLUSTER SLOT-STATS SLOTSRANGE start-slot end-slot
or
CLUSTER SLOT-STATS ORDERBY metric [LIMIT limit] [ASC/DESC]
where metric can currently be one of the following
key-count -- Number of keys in a given slot
cpu-usec -- Amount of CPU time (in microseconds) spent on a given slot
network-bytes-in -- Amount of network ingress (in bytes) received for given slot
network-bytes-out -- Amount of network egress (in bytes) sent out for given slot
This PR is based on:
valkey-io/valkey#351
valkey-io/valkey#709
valkey-io/valkey#710
Co-authored-by: Kyle Kim <kimkyle@amazon.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
Add CLUSTER SLOT-STATS command for key count, cpu time and
network IO per slot currently.
The command has the following syntax
CLUSTER SLOT-STATS SLOTSRANGE start-slot end-slot
or
CLUSTER SLOT-STATS ORDERBY metric [LIMIT limit] [ASC/DESC]
where metric can currently be one of the following
key-count -- Number of keys in a given slot
cpu-usec -- Amount of CPU time (in microseconds) spent on a given slot
network-bytes-in -- Amount of network ingress (in bytes) received for given slot
network-bytes-out -- Amount of network egress (in bytes) sent out for given slot
This PR is based on:
valkey-io/valkey#351
valkey-io/valkey#709
valkey-io/valkey#710
Co-authored-by: Kyle Kim <kimkyle@amazon.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
Add CLUSTER SLOT-STATS command for key count, cpu time and network IO
per slot currently.
The command has the following syntax
CLUSTER SLOT-STATS SLOTSRANGE start-slot end-slot
or
CLUSTER SLOT-STATS ORDERBY metric [LIMIT limit] [ASC/DESC]
where metric can currently be one of the following
key-count -- Number of keys in a given slot
cpu-usec -- Amount of CPU time (in microseconds) spent on a given slot
network-bytes-in -- Amount of network ingress (in bytes) received for
given slot
network-bytes-out -- Amount of network egress (in bytes) sent out for
given slot
This PR is based on:
valkey-io/valkey#351
valkey-io/valkey#709
valkey-io/valkey#710
valkey-io/valkey#720
valkey-io/valkey#840
Co-authored-by: Kyle Kim <kimkyle@amazon.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Harkrishn Patro <harkrisp@amazon.com>
---------
Co-authored-by: Kyle Kim <kimkyle@amazon.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
Add CLUSTER SLOT-STATS command for key count, cpu time and network IO
per slot currently.
The command has the following syntax
CLUSTER SLOT-STATS SLOTSRANGE start-slot end-slot
or
CLUSTER SLOT-STATS ORDERBY metric [LIMIT limit] [ASC/DESC]
where metric can currently be one of the following
key-count -- Number of keys in a given slot
cpu-usec -- Amount of CPU time (in microseconds) spent on a given slot
network-bytes-in -- Amount of network ingress (in bytes) received for
given slot
network-bytes-out -- Amount of network egress (in bytes) sent out for
given slot
This PR is based on:
valkey-io/valkey#351
valkey-io/valkey#709
valkey-io/valkey#710
valkey-io/valkey#720
valkey-io/valkey#840
Co-authored-by: Kyle Kim <kimkyle@amazon.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
Co-authored-by: Harkrishn Patro <harkrisp@amazon.com>
---------
Co-authored-by: Kyle Kim <kimkyle@amazon.com>
Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
The command provides detailed slot usage statistics upon invocation, with initial support for key-count metric. cpu-usec (approved) and memory-bytes (pending-approval) metrics will soon follow after the merger of this PR.