Skip to content

Commit

Permalink
Log failing benchmark test
Browse files Browse the repository at this point in the history
  • Loading branch information
bjosv committed Sep 23, 2024
1 parent 6bb24e5 commit f716e67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ jobs:
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_SSL=ON
ninja -v
- name: Run tests in CMake build
run: |
cd build && ninja -v test
- name: Build using Makefile
run: USE_SSL=1 make
- name: Run tests
Expand Down
12 changes: 9 additions & 3 deletions tests/client_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1561,11 +1561,17 @@ static void test_throughput(struct config config) {
printf("\t(%dx PING (pipelined): %.3fs)\n", num, (t2 - t1) / 1000000.0);

replies = vk_malloc_safe(sizeof(valkeyReply *) * num);
for (i = 0; i < num; i++)
valkeyAppendCommand(c, "LRANGE mylist 0 499");
for (i = 0; i < num; i++) {
int res = valkeyAppendCommand(c, "LRANGE mylist 0 499");
if (res != VALKEY_OK)
printf("\tvalkeyAppendCommand failure, i=%d res=%d\n", i, res);
}
t1 = usec();
for (i = 0; i < num; i++) {
assert(valkeyGetReply(c, (void *)&replies[i]) == VALKEY_OK);
int res = valkeyGetReply(c, (void *)&replies[i]);
if (res != VALKEY_OK)
printf("\tvalkeyGetReply failure, i=%d res=%d\n", i, res);
assert(res == VALKEY_OK);
assert(replies[i] != NULL && replies[i]->type == VALKEY_REPLY_ARRAY);
assert(replies[i] != NULL && replies[i]->elements == 500);
}
Expand Down

0 comments on commit f716e67

Please sign in to comment.