summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-04-14 19:35:00 +0200
committerantirez <antirez@gmail.com>2014-04-14 19:35:00 +0200
commitdde8dff73fd814910b317df2beb84b88d5659d37 (patch)
treef02995e35ac9af927eb469e30991a5b83fa9e645
parent54f0156e8cbf1a58243d3a2b35f61311e1a034a4 (diff)
downloadredis-dde8dff73fd814910b317df2beb84b88d5659d37.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);
}