summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanguard_space <mailmahee@gmail.com>2023-02-02 09:18:22 -0800
committerGitHub <noreply@github.com>2023-02-02 09:18:22 -0800
commit3b260149e0996b8ee12510b0b9508bca56743269 (patch)
tree9dd927612576cd3de7351b7563df70c5c52706eb /src
parentfd3975684a8e9e45c77d3b14cb1883572956efe7 (diff)
downloadredis-3b260149e0996b8ee12510b0b9508bca56743269.tar.gz
adding the ability to add streams to the pre-defined redis-benchmark tests (#11762)
Added standard way to support xadd as one of the commands that can be run via redis-benchmarking tool
Diffstat (limited to 'src')
-rw-r--r--src/redis-benchmark.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c
index c5dd187b8..0d10e8d3f 100644
--- a/src/redis-benchmark.c
+++ b/src/redis-benchmark.c
@@ -2030,6 +2030,12 @@ int main(int argc, char **argv) {
sdsfree(key_placeholder);
}
+ if (test_is_selected("xadd")) {
+ len = redisFormatCommand(&cmd,"XADD mystream%s * myfield %s", tag, data);
+ benchmark("XADD",cmd,len);
+ free(cmd);
+ }
+
if (!config.csv) printf("\n");
} while(config.loop);