Skip to content

Commit 37a1a56

Browse files
authored
ci: benchmark should be fair (#267)
1 parent 4188cfd commit 37a1a56

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,14 @@ jobs:
195195
run: df -h
196196
- name: Run minitest
197197
run: bundle exec rake bench | grep BenchCommand | grep -v 'Envoy#bench_pipeline_echo\|Envoy#bench_single_echo' | sort
198-
- name: Run iteration per second
199-
run: bundle exec rake ips
200198
- name: Reset qdisc
201199
run: |
202200
for i in {5..9..2}
203201
do
204202
docker compose -f $DOCKER_COMPOSE_FILE exec node$i tc qdisc del dev eth0 root netem || true
205203
done
204+
- name: Run iteration per second
205+
run: bundle exec rake ips
206206
- name: Stop containers
207207
run: docker compose -f $DOCKER_COMPOSE_FILE down || true
208208
profiling:

test/ips_pipeline.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def run
2727
def make_client(model)
2828
::RedisClient.cluster(
2929
nodes: TEST_NODE_URIS,
30+
replica: true,
31+
replica_affinity: :random,
3032
fixed_hostname: TEST_FIXED_HOSTNAME,
3133
concurrent_worker_model: model,
3234
**TEST_GENERIC_OPTIONS

test/ips_single.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ def run
2525
def make_client
2626
::RedisClient.cluster(
2727
nodes: TEST_NODE_URIS,
28+
replica: true,
29+
replica_affinity: :random,
2830
fixed_hostname: TEST_FIXED_HOSTNAME,
2931
**TEST_GENERIC_OPTIONS
3032
).new_client

0 commit comments

Comments
 (0)