redis-benchmark: Add zfree(data) and fix lrange size / text mismatch (#8872)
missing zfree(data) in redis-benchmark. And also correct the wrong size in lrange. the text mentioned 500, but size was 450, changed to 500
This commit is contained in:
parent
416f277339
commit
1eff8564c7
@ -1939,8 +1939,8 @@ int main(int argc, const char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (test_is_selected("lrange") || test_is_selected("lrange_500")) {
|
if (test_is_selected("lrange") || test_is_selected("lrange_500")) {
|
||||||
len = redisFormatCommand(&cmd,"LRANGE mylist%s 0 449",tag);
|
len = redisFormatCommand(&cmd,"LRANGE mylist%s 0 499",tag);
|
||||||
benchmark("LRANGE_500 (first 450 elements)",cmd,len);
|
benchmark("LRANGE_500 (first 500 elements)",cmd,len);
|
||||||
free(cmd);
|
free(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1967,6 +1967,7 @@ int main(int argc, const char **argv) {
|
|||||||
if (!config.csv) printf("\n");
|
if (!config.csv) printf("\n");
|
||||||
} while(config.loop);
|
} while(config.loop);
|
||||||
|
|
||||||
|
zfree(data);
|
||||||
if (config.redis_config != NULL) freeRedisConfig(config.redis_config);
|
if (config.redis_config != NULL) freeRedisConfig(config.redis_config);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user