summaryrefslogtreecommitdiff
path: root/src/dict.c
diff options
context:
space:
mode:
authorsundb <sundbcn@gmail.com>2021-11-16 14:55:10 +0800
committerGitHub <noreply@github.com>2021-11-16 08:55:10 +0200
commite725d737fb2ee492fbcd04bb7deb1696d7e182d1 (patch)
treeb84ce135e03c4e9708ec250671c95b5f9130f5a8 /src/dict.c
parentaba70df48f2ca8a567d2c11d34fb768bf764c487 (diff)
downloadredis-e725d737fb2ee492fbcd04bb7deb1696d7e182d1.tar.gz
Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784)
This is a preparation step in order to add a new test in quicklist.c see #9776
Diffstat (limited to 'src/dict.c')
-rw-r--r--src/dict.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dict.c b/src/dict.c
index a6c8990e1..0efd5e92a 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -1183,6 +1183,7 @@ void dictGetStats(char *buf, size_t bufsize, dict *d) {
/* ------------------------------- Benchmark ---------------------------------*/
#ifdef REDIS_TEST
+#include "testhelp.h"
#define UNUSED(V) ((void) V)
@@ -1235,11 +1236,12 @@ dictType BenchmarkDictType = {
} while(0)
/* ./redis-server test dict [<count> | --accurate] */
-int dictTest(int argc, char **argv, int accurate) {
+int dictTest(int argc, char **argv, int flags) {
long j;
long long start, elapsed;
dict *dict = dictCreate(&BenchmarkDictType);
long count = 0;
+ int accurate = (flags & REDIS_TEST_ACCURATE);
if (argc == 4) {
if (accurate) {