Skip to content

Conversation

@destinyoooo
Copy link

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
Author

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

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