Repository navigation
Add callgrind harness - #576
Conversation
|
|
||
| # Set up the benchmarking command | ||
| cmd = (cmd_prefix + [ | ||
| profiler_prefix = benchmark_harness == "callgrind" ? callgrind_cmd(script_path) : [] |
There was a problem hiding this comment.
Is this common enough that we should have a harness_cmd_for similar to harness_args_for?
|
|
||
| # Load before benchmark Bundler setup can hide globally installed gems. | ||
| ensure_global_gem("valgrind") | ||
| require "valgrind" |
There was a problem hiding this comment.
this is my gem. it seems we don't do gemfiles for this kind of harness dep :/
There was a problem hiding this comment.
The gem seems fine to me. It's cleaner than shelling out, which we could always fall back to if necessary.
There was a problem hiding this comment.
Maybe try what the stackprof harness does?
ruby-bench/harness/stackprof.rb
Line 12 in ab81550
As long as you have gem installed a gem you want to use, there's always a way to load it. And it seems like this repository already has an eastablished hack for that purpose.
There was a problem hiding this comment.
yeah i have ensure_global_gem
|
Does it raise an error properly if you run with the harness but without callgrind? |
|
Now it does, and also detects non-Linux platforms. Thanks |
|
Now to figure out ruby/ruby#19851 |
I want to measure callgrind instructions too, which can be more stable than pure wall time.