summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-04-14 19:35:00 +0200
committerantirez <antirez@gmail.com>2014-04-16 15:09:47 +0200
commit66f67208d3a66f4b9eb90c90432d8db3bf71a80c (patch)
tree792f061c4fe06c95783a137d3a29e354daaab390
parentdb929041b5e9254e730f8c212e1edde8e96c8a8c (diff)
downloadredis-66f67208d3a66f4b9eb90c90432d8db3bf71a80c.tar.gz
PFDEBUG ENCODING added.
-rw-r--r--src/hyperloglog.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hyperloglog.c b/src/hyperloglog.c
index f5df8fc31..393cc418d 100644
--- a/src/hyperloglog.c
+++ b/src/hyperloglog.c
@@ -1396,6 +1396,13 @@ void pfdebugCommand(redisClient *c) {
decoded = sdstrim(decoded," ");
addReplyBulkCBuffer(c,decoded,sdslen(decoded));
sdsfree(decoded);
+ }
+ /* PFDEBUG ENCODING <key> */
+ else if (!strcasecmp(cmd,"encoding")) {
+ char *encodingstr[2] = {"dense","sparse"};
+ if (c->argc != 3) goto arityerr;
+
+ addReplyStatus(c,encodingstr[hdr->encoding]);
} else {
addReplyErrorFormat(c,"Unknown PFDEBUG subcommand '%s'", cmd);
}