Skip to content

feat: add key min size filter condition#58

Closed
destinyoooo wants to merge 1 commit intoHDT3213:masterfrom
destinyoooo:keysize
Closed

feat: add key min size filter condition#58
destinyoooo wants to merge 1 commit intoHDT3213:masterfrom
destinyoooo:keysize

Conversation

@destinyoooo
Copy link
Copy Markdown

Use the command line to add the -key-size command and filter the results based on the value size: for example:

[root@localhost rdb]# ./target/rdb-linux-amd64 -c memory -o mem.csv examples/decode/example.rdb
[root@localhost rdb]# cat mem.csv
database,key,type,size,size_readable,element_count,encoding,expiration
0,hash,hash,131,131B,2,ziplist,
0,s,string,64,64B,0,string,
0,e,string,88,88B,0,string,2022-02-18T06:15:29+08:00
0,list,list,203,203B,4,quicklist,
0,zset,zset,99,99B,2,ziplist,
0,large,string,2608,2.5K,0,string,
0,set,set,284,284B,2,set,

The execution result of adding -key-size 204 is as follows

[root@localhost rdb]# ./target/rdb-linux-amd64 -c memory -key-size 204 -o mem2.csv examples/decode/example.rdb
[root@localhost rdb]# cat mem2.csv
database,key,type,size,size_readable,element_count,encoding,expiration
0,large,string,2608,2.5K,0,string,
0,set,set,284,284B,2,set,

@destinyoooo
Copy link
Copy Markdown
Author

@HDT3213 Could you take a look? Or whether this is necessary to be merged?

@HDT3213
Copy link
Copy Markdown
Owner

HDT3213 commented Dec 31, 2025

added in v1.3.1

@HDT3213 HDT3213 closed this Dec 31, 2025
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.

2 participants