I found that adding this to Cargo.toml isn't needed (from https://github.com/mpizenberg/pubgrub-rs/issues/27):
# in Cargo.toml [profile.release] debug = true [profile.bench] debug = true
Release profile isn't used when running
cargo bench, and benchmarking profile must be already including debug symbols since I got a report from
perf just fine.
I did something in my .cargo/config to always have debug symbols. I keeped benchmarking things only to find that I had no useful info. So I no longer remember which require that incantation.
BTW, what OS are you on? The advice in the writeup is very Linux sencrick. I think that list of tools can be made to work on mac as well, but you'll need a totally different list for windows.
I tried following the guide on Arch Linux without doing any changes to the default Rust setup. Works fine without modifying Cargo.toml for me.
Yep the default profile already includes a few things but adding
debug = true enable more info and more dynamic things with things like debuggers where you can add breakpoints for example. The release profile is not necessary for something generated from a benchmark but rather if we want to profile things in
examples/ for example. I don't remember which profile is using criterion.
Last updated: Oct 21 2021 at 22:01 UTC