add new RUBY_BENCH_CMD_PREFIX option#513
Closed
luke-gruber wants to merge 1 commit into
Closed
Conversation
Member
|
I guess you didn't like |
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.
5278dbe to
729bcf9
Compare
Collaborator
Author
|
I like going through |
Member
|
Just to be clear, you're just saying you like
|
Collaborator
Author
|
Oh sorry I misunderstood. I didn't realize I could use a non-ruby ruby path, thank you 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If you want to run
perfduring 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" 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 --yjit-perf" 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.