-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does cargo bench
work with flamegraph?
#39
Comments
Hi @blaesus, |
@jonas-schievink There are 6 other issues related to benchmark support and some of them have been closed already - but I've been unable to get benches work so far. To clarify, does cargo-flamegraph support libraries with no binaries with the current master? I've verified that Here are all the different combinations I've tried and failed:
Can you provide an example command please? |
@jaseemabid on what code are you running that? I got this part working locally, but I'm getting "Workload failed: Permission denied" when it tries to profile it. |
@jonas-schievink I'm passing the same name to both Is there a command to run all benches instead? I'll probably take a look at the code later because I cant make any progress with the current error messages from the cli, but it would have been really nice to make this work once before jumping in. |
@jonas-schievink I had a whole bunch of permission errors on mac, but that's mostly osx issues instead of cargo-flamegraph. Switched to linux instead and now I'm facing this. |
|
Moving the benchmarks explicitly to benches/ folder did the trick, I had them with the rest of the unit tests. Thanks @jonas-schievink |
Closing as fixed. |
I have benchmarks set up in
benches
directory, connected to the main project with a[[bench]]
section inCargo.toml
. The benches are simple function calls invoked by their ownmain()
, withoutCriterion
or other benchmark-related dependencies.Currently we simply run
cargo bench
to compile benchmarks, which produces abenchmark_name_hash
executable file intarget/release
, for which we manually draw flamegraph by withThis produces usable flamegrpahs.
However, can this be simplified?
We tried this command:
It doesn't work. Error message is
Adding the
profile.release
section does not help.Operating system is OSX 10.14.
The text was updated successfully, but these errors were encountered: