Repository navigation
Commit 729bcf9
committed
add new RUBY_BENCH_CMD_PREFIX option
If you want to run `perf` during the benchmark run, but you don't want to record any
non-benchmark code, there is currently no way to do this outside of the perf harness. The
perf harness has the downside that it only works with perf, and not with samply or other profilers.
RUBY_BENCH_CMD_PREFIX="perf record -g" ./run_benchmarks.rb --chruby="head::ruby_head --yjit --yjit-perf=map" railsbench
You can use any command you want, so it's not limited to perf:
RUBY_BENCH_CMD_PREFIX="samply record" ./run_benchmarks.rb --chruby="head::ruby_head --yjit" railsbench
Note that unlike the perf harness, this wraps the entire benchmark run with the command, so even warmup iterations are
recorded.
This option can be used with any command, so it's not limited to profiling.
You can currently run perf or samply by running the benchmark directly, but it's useful to go through `run_benchmarks.rb`
option processing and chruby switching.1 parent 7361542 commit 729bcf9
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
| |||
0 commit comments