Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/valkey-benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,12 @@ int main(int argc, char **argv) {
free(cmd);
}

if (test_is_selected("sismember")) {
len = valkeyFormatCommand(&cmd, "SISMEMBER myset%s element:__rand_int__", tag);
benchmark("SISMEMBER", cmd, len);
free(cmd);
}

if (test_is_selected("zadd")) {
char *score = "0";
if (config.replace_placeholders) score = "__rand_int__";
Expand All @@ -2352,6 +2358,19 @@ int main(int argc, char **argv) {
free(cmd);
}

if (test_is_selected("zscore")) {
len = valkeyFormatCommand(&cmd, "ZSCORE myzset%s element:__rand_1st__", tag);
benchmark("ZSCORE", cmd, len);
free(cmd);
}

if (test_is_selected("zrange")) {
int score_min = (config.keyspacelen != 0) ? (random() % config.keyspacelen) : 0;
len = valkeyFormatCommand(&cmd, "ZRANGE myzset%s %d +inf BYSCORE LIMIT 0 1", tag, score_min);
benchmark("ZRANGE", cmd, len);
free(cmd);
}

if (test_is_selected("lrange") || test_is_selected("lrange_100") || test_is_selected("lrange_300") ||
test_is_selected("lrange_500") || test_is_selected("lrange_600")) {
len = valkeyFormatCommand(&cmd, "LPUSH mylist%s %s", tag, data);
Expand Down
Loading