Skip to content

Commit 7841bf9

Browse files
Fix the run_once.sh script to run with all categories.'
1 parent e54792a commit 7841bf9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

run_once.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
#!/usr/bin/env bash
22
# Script to run a single benchmark once
33
# You can pass --yjit-stats and other ruby arguments to this script.
4-
# eg:
5-
# ./run_once.sh --yjit-stats benchmarks/railsbench/benchmark.rb
4+
# Automatically detects Ractor benchmarks and uses the appropriate harness.
5+
# Examples:
6+
# ./run_once.sh --yjit-stats benchmarks/railsbench/benchmark.rb
7+
# ./run_once.sh benchmarks-ractor/optcarrot/benchmark.rb
68

7-
WARMUP_ITRS=0 MIN_BENCH_ITRS=1 MIN_BENCH_TIME=0 ruby -I./harness $*
9+
# Detect if any argument contains benchmarks-ractor/ to determine harness
10+
HARNESS="./harness"
11+
for arg in "$@"; do
12+
if [[ "$arg" == *"benchmarks-ractor/"* ]]; then
13+
HARNESS="./harness-ractor"
14+
break
15+
fi
16+
done
17+
18+
WARMUP_ITRS=0 MIN_BENCH_ITRS=1 MIN_BENCH_TIME=0 ruby -I"$HARNESS" "$@"

0 commit comments

Comments
 (0)