Skip to content

server_family: Expose command latency stats as part of info #5372

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

abhijat
Copy link
Contributor

@abhijat abhijat commented Jun 27, 2025

Command latency is recorded in its histogram when command is invoked.

When info latencystats is run, the latency for a fixed set of percentiles (50,99,99.9 by default) is returned per command.

Currently the percentiles are fixed, but in a later PR these should be made configurable as command line option as well as config set.

FIXES #5092

@abhijat abhijat force-pushed the abhijat/feat/5092/support-latency-percentiles branch 5 times, most recently from 3c0963e to a908568 Compare June 27, 2025 09:34
Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
@abhijat abhijat force-pushed the abhijat/feat/5092/support-latency-percentiles branch from a908568 to f513541 Compare July 1, 2025 06:05
Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
@abhijat abhijat force-pushed the abhijat/feat/5092/support-latency-percentiles branch from f513541 to 9a7ed14 Compare July 1, 2025 06:08
@abhijat
Copy link
Contributor Author

abhijat commented Jul 1, 2025

In this PR, the latency stats for sub-commands (for example info memory - where memory is sub-command of info) are not returned individually, we return just one stat for the parent.

This is because we do not have tracking information at the command registry level for sub-commands.

It might be useful to return the latency for individual sub-commands eventually.

Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
@abhijat abhijat force-pushed the abhijat/feat/5092/support-latency-percentiles branch from 9a7ed14 to aacb5d5 Compare July 1, 2025 06:33
@abhijat abhijat changed the title WIP: server_family: Expose command latency stats as part of info server_family: Expose command latency stats as part of info Jul 1, 2025
@abhijat abhijat marked this pull request as ready for review July 1, 2025 06:47
@abhijat abhijat requested review from kostasrim and adiholden July 1, 2025 11:02
@kostasrim
Copy link
Contributor

I will review this in the morning. Witting here so I don't forget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for redis_latency_percentiles_usec Metric in DragonFlyDB
2 participants