Skip to content
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

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

artikell
Copy link
Contributor

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.

  • Added the --profiler parameter to the valkey-check-rdb tool's rdb analysis functionality, which enables opening reports.
  • Supported the --format parameter with two options, info and from, to provide more flexible output formats.

The content format is as follows:

... ...
[offset 8999] \o/ RDB looks OK! \o/
[info] 60 keys read
[info] 0 expires
[info] 0 already expired
db.0.type.name                  string  list    set     zset    hash    module  stream
db.0.keys.total                 10      0       0       0       0       0       0    
db.0.exipre_keys.total          0       0       0       0       0       0       0    
db.0.already_expired.total      0       0       0       0       0       0       0    
db.0.keys.size                  200     0       0       0       0       0       0    
db.0.keys.value_size            2000    0       0       0       0       0       0    
db.0.elements.total             10      0       0       0       0       0       0    
db.0.elements.size              2000    0       0       0       0       0       0    
db.0.elements.num.max           1       0       0       0       0       0       0    
db.0.elements.num.avg           1.00    0.00    0.00    0.00    0.00    0.00    0.00 
db.0.elements.num.p99           1.00    0.00    0.00    0.00    0.00    0.00    0.00 
db.0.elements.num.p90           1.00    0.00    0.00    0.00    0.00    0.00    0.00 
db.0.elements.num.p50           1.00    0.00    0.00    0.00    0.00    0.00    0.00 
db.0.elements.size.max          200     0       0       0       0       0       0    
db.0.elements.size.avg          200.00  0.00    0.00    0.00    0.00    0.00    0.00 
db.0.elements.size.p99          200.00  0.00    0.00    0.00    0.00    0.00    0.00 
db.0.elements.size.p90          200.00  0.00    0.00    0.00    0.00    0.00    0.00 
db.0.elements.size.p50          200.00  0.00    0.00    0.00    0.00    0.00    0.00

Copy link

codecov bot commented Feb 16, 2025

Codecov Report

Attention: Patch coverage is 75.54585% with 56 lines in your changes missing coverage. Please review.

Project coverage is 71.16%. Comparing base (c5ae37f) to head (04c476c).
Report is 4 commits behind head on unstable.

Files with missing lines Patch % Lines
src/valkey-check-rdb.c 75.54% 56 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1743      +/-   ##
============================================
- Coverage     71.17%   71.16%   -0.01%     
============================================
  Files           123      123              
  Lines         65536    65751     +215     
============================================
+ Hits          46645    46794     +149     
- Misses        18891    18957      +66     
Files with missing lines Coverage Δ
src/valkey-check-rdb.c 71.09% <75.54%> (+6.50%) ⬆️

... and 16 files with indirect coverage changes

Co-authored-by: wei.kukey <wei.kukey@gmail.com>
Signed-off-by: artikell <739609084@qq.com>
@artikell artikell force-pushed the feat/profile_feature branch from 523708d to 04c476c Compare February 16, 2025 12:30
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.

1 participant