diff options
author | Binbin <binloveplay1314@qq.com> | 2021-04-28 21:03:24 +0800 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2021-05-03 22:57:00 +0300 |
commit | 1eab6202ac867b3210a7827cfe7e1ac3a3a9d356 (patch) | |
tree | 89f947f1cb99c5cc0c82f6825b0320ec31423ffe | |
parent | d30ee6c44a72d9a3a13167cef5914943ede0f4d2 (diff) | |
download | redis-1eab6202ac867b3210a7827cfe7e1ac3a3a9d356.tar.gz |
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
(cherry picked from commit 1eff8564c78011f7257e485796990a0d4d607a5b)
-rw-r--r-- | src/redis-benchmark.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c index 51dba9511..fa024d44f 100644 --- a/src/redis-benchmark.c +++ b/src/redis-benchmark.c @@ -1946,8 +1946,8 @@ int main(int argc, const char **argv) { } if (test_is_selected("lrange") || test_is_selected("lrange_500")) { - len = redisFormatCommand(&cmd,"LRANGE mylist%s 0 449",tag); - benchmark("LRANGE_500 (first 450 elements)",cmd,len); + len = redisFormatCommand(&cmd,"LRANGE mylist%s 0 499",tag); + benchmark("LRANGE_500 (first 500 elements)",cmd,len); free(cmd); } @@ -1974,6 +1974,7 @@ int main(int argc, const char **argv) { if (!config.csv) printf("\n"); } while(config.loop); + zfree(data); if (config.redis_config != NULL) freeRedisConfig(config.redis_config); return 0; |