redis-cli: fix missed unit in array. Change define name.

This commit is contained in:
antirez 2018-03-01 15:06:41 +01:00
parent 83b5b5a476
commit d63caaa820

View File

@ -2077,7 +2077,7 @@ static void pipeMode(void) {
#define TYPE_ZSET 4
#define TYPE_STREAM 5
#define TYPE_NONE 6
#define TYPE_MAX_KEYS TYPE_NONE
#define TYPE_COUNT 7
static redisReply *sendScan(unsigned long long *it) {
redisReply *reply = redisCommand(context, "SCAN %llu", *it);
@ -2223,11 +2223,11 @@ static void getKeySizes(redisReply *keys, int *types,
}
static void findBigKeys(void) {
unsigned long long biggest[TYPE_MAX_KEYS] = {0}, counts[TYPE_MAX_KEYS] = {0}, totalsize[TYPE_MAX_KEYS] = {0};
unsigned long long biggest[TYPE_COUNT] = {0}, counts[TYPE_COUNT] = {0}, totalsize[TYPE_COUNT] = {0};
unsigned long long sampled = 0, total_keys, totlen=0, *sizes=NULL, it=0;
sds maxkeys[TYPE_MAX_KEYS] = {0};
char *typename[] = {"string","list","set","hash","zset","stream"};
char *typeunit[] = {"bytes","items","members","fields","members"};
sds maxkeys[TYPE_COUNT] = {0};
char *typename[] = {"string","list","set","hash","zset","stream","none"};
char *typeunit[] = {"bytes","items","members","fields","members","entries",""};
redisReply *reply, *keys;
unsigned int arrsize=0, i;
int type, *types=NULL;