-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend LATENCY LATEST to add sum / cnt stats #1570
Conversation
Currently LATENCY LATEST only has the following fields: - Event name. - Unix timestamp of the latest latency spike for the event. - Latest event latency in millisecond. - All-time maximum latency for this event. This PR introduced these fields: - min: the all-time minimum latency for this event (maybe not that useful) - sum: the all-time sum latency for this event (i think it is useful for some events) - cnt: the event count that trigger the latency, with the sum we can calc the avg Signed-off-by: Binbin <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1570 +/- ##
============================================
+ Coverage 70.96% 71.02% +0.05%
============================================
Files 120 121 +1
Lines 65094 65183 +89
============================================
+ Hits 46191 46293 +102
+ Misses 18903 18890 -13
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think we can add this.
We are adding these in the end of an array reply. I remember we did something like that in CLUSTER SLOTS and we said it is a backward-compatible change, but still it broke some clients. For example, hiredis-cluster was checking the exact array length in the handling of CLUSTER SLOTS.
LATENCY LATEST is not as risky to change as CLUSTER SLOTS, but we should still be aware that some monitoring tools maybe can break. We should mention it in the release notes and we should add some note in the documentation that new fields can be added. A note like that makes it more clear that adding more fields in the reply is a backward compatible change. Now we don't have a note like that on https://valkey.io/commands/latency-latest/.
@valkey-io/core-team Please vote to extend the multi-bulk reply with three more numbers. |
Signed-off-by: Binbin <[email protected]>
7cfe830
to
eac30eb
Compare
Currently LATENCY LATEST only has the following fields:
This PR introduced these fields: