-
Notifications
You must be signed in to change notification settings - Fork 757
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
Support for RDB analysis reports #1743
base: unstable
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1743 +/- ##
============================================
- Coverage 71.17% 70.96% -0.22%
============================================
Files 123 123
Lines 65536 65927 +391
============================================
+ Hits 46645 46783 +138
- Misses 18891 19144 +253
🚀 New features to boost your workflow:
|
Co-authored-by: wei.kukey <[email protected]> Signed-off-by: artikell <[email protected]>
523708d
to
04c476c
Compare
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.
Cool. Not sure about the argument name --profiler
. Profiler is more often used for things like CPU time.
How about --stats
or --verbose
?
An RDB file can also contain Functions IIRC. Shall we print the count too?
@enjoy-binbin I know you wanted to print the eval scripts in old RDB files. Maybe we can print the number of scripts as part of stats here too?
|
Signed-off-by: artikell <[email protected]>
Signed-off-by: artikell <[email protected]>
You have a wrong memory, i dont want to print the lua scripts, i want to print the number of scripts. See #1448 |
Sorry, I mean number of scripts. This PR prints the number of many things, such as the of functions, number of keys of each type, etc. To print the number of lua scripts if any would make sense here? Maybe only print it if it's non-zero, because it's only for quite old RDB files. WDYT? |
SGTM, we can print it (that is what i was looking for at that time). I can re-open the old PR if needed if you want to keep the history. Or we can do it in this PR. |
I guess in this PR is better in that case. This PR prints the info in another way. Or maybe reopen it after this PR is merged. @artikell do you want to add the number of lua scripts from old RDB files as in #1448? They are just aux-fields with the name "lua". I suggest print them only if the number is non-zero since it's old stuff that will always be zero except in very old RDB files. |
@artikell What is the "form" formats? Can you mention it in the PR top comment? What's the use case of the "form" format? If it is to consume by scripts, I guess CSV or JSON formats is more common. We already use those formats in valkey-cli and valkey-benchmark. |
Regarding the number of Lua scripts, I will refer to Binbin's MR to make the addition in this MR. |
Yes maybe "table" is a better name. The example in the PR comment is the "info" format? It is also readable for users. Not a big difference to "form"? I'm thinking maybe we don't need both.... For CSV, JSON, YAML, I don't have a strong opinion but it seems nice to align the output format from our different tools. CSV seems to be supported by most of them so add it here too? |
Co-authored-by: Binbin <[email protected]> Signed-off-by: artikell <[email protected]>
Signed-off-by: artikell <[email protected]>
@zuiderkwast I've understood your thoughts. Now I've changed it to three formats:
|
The PR add analysis capabilities to the valkey-check-rdb tool. Now the tool can statistically analyze various types of keys, expired keys, and key elements.
The content format is as follows: