File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 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 " " $@ "
You can’t perform that action at this time.
0 commit comments