X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/e10768518cdfc5df532471711f1f97ed32ad4bc5..1858da2faae3b6a8becf4f7eef3f712d6e4b986b:/src/redis-cli.c diff --git a/src/redis-cli.c b/src/redis-cli.c index 4a936133..f7fe54fa 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -890,7 +890,7 @@ static int evalMode(int argc, char **argv) { static void latencyMode(void) { redisReply *reply; - long long start, latency, min, max, tot, count = 0; + long long start, latency, min = 0, max = 0, tot = 0, count = 0; double avg; if (!context) exit(1); @@ -977,7 +977,7 @@ static void slaveMode(void) { static void findBigKeys(void) { unsigned long long biggest[5] = {0,0,0,0,0}; unsigned long long samples = 0; - redisReply *reply1, *reply2, *reply3; + redisReply *reply1, *reply2, *reply3 = NULL; char *sizecmd, *typename[] = {"string","list","set","hash","zset"}; int type; @@ -1030,7 +1030,7 @@ static void findBigKeys(void) { reply3 = redisCommand(context,"%s %s", sizecmd, reply1->str); if (reply3 && reply3->type == REDIS_REPLY_INTEGER) { if (biggest[type] < reply3->integer) { - printf("Biggest %s so far: %s, size: %llu\n", + printf("[%6s] %s | biggest so far with size %llu\n", typename[type], reply1->str, (unsigned long long) reply3->integer); biggest[type] = reply3->integer;