diff options
author | Matt Stancliff <matt@genges.com> | 2014-12-19 10:41:52 -0500 |
---|---|---|
committer | Matt Stancliff <matt@genges.com> | 2015-01-02 11:16:10 -0500 |
commit | 9e11d07909086999d54181466eafecab44a0dbe3 (patch) | |
tree | b97a7d94f8e0984cd438802d1175af09457b4426 /src/quicklist.c | |
parent | 02bb515a094c081fcbc3e33c60a5dbff440eb447 (diff) | |
download | redis-9e11d07909086999d54181466eafecab44a0dbe3.tar.gz |
Add more quicklist info to DEBUG OBJECT
Adds: ql_compressed (boolean, 1 if compression enabled for list, 0
otherwise)
Adds: ql_uncompressed_size (actual uncompressed size of all quicklistNodes)
Adds: ql_ziplist_max (quicklist max ziplist fill factor)
Compression ratio of the list is then ql_uncompressed_size / serializedlength
We report ql_uncompressed_size for all quicklists because serializedlength
is a _compressed_ representation anyway.
Sample output from a large list:
127.0.0.1:6379> llen abc
(integer) 38370061
127.0.0.1:6379> debug object abc
Value at:0x7ff97b51d140 refcount:1 encoding:quicklist serializedlength:19878335 lru:9718164 lru_seconds_idle:5 ql_nodes:21945 ql_avg_node:1748.46 ql_ziplist_max:-2 ql_compressed:0 ql_uncompressed_size:1643187761
(1.36s)
The 1.36s result time is because rdbSavedObjectLen() is serializing the
object, not because of any new stats reporting.
If we run DEBUG OBJECT on a compressed list, DEBUG OBJECT takes almost *zero*
time because rdbSavedObjectLen() reuses already-compressed ziplists:
127.0.0.1:6379> debug object abc
Value at:0x7fe5c5800040 refcount:1 encoding:quicklist serializedlength:19878335 lru:9718109 lru_seconds_idle:5 ql_nodes:21945 ql_avg_node:1748.46 ql_ziplist_max:-2 ql_compressed:1 ql_uncompressed_size:1643187761
Diffstat (limited to 'src/quicklist.c')
0 files changed, 0 insertions, 0 deletions