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 0a6157d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install dependencies
run: brew install ninja valkey
run: brew install ninja
# run: brew install ninja valkey
- name: Install Valkey for non-cluster tests
run: |
# git clone --depth 1 --branch 7.2.5 https://github.com/valkey-io/valkey.git
git clone --depth 1 --branch 8.0.0 https://github.com/valkey-io/valkey.git
cd valkey && BUILD_TLS=yes make install
- name: Build using CMake
run: |
mkdir build && cd build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/db-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
fail-fast: false
matrix:
include:
- valkey-version: '8.0.0'
- valkey-version: '7.2.5'
steps:
- name: Prepare
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 0a6157d

Please sign in to comment.