summaryrefslogtreecommitdiff
path: root/src/hyperloglog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hyperloglog.c')
-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);
}