cargo-profiler icon indicating copy to clipboard operation
cargo-profiler copied to clipboard

Doc Improvements

Open jayanderson opened this issue 8 years ago • 1 comments

Answering these questions will probably just need doc improvements rather than other fixes, but I'm not sure so here goes:

  • Using cargo profiler callgrindwhich executable is run?
  • How does this work with cargo bench? Can I run cargo profiler --bench callgrind (or something like that) to get profile stats for the different benchmarks? For now I've been creating a main.rs building that (with debug symbols) and then using cargo profiler callgrind -n 20 --bin ./target/release/executable_name. I swap out the contents of main with my benchmarks to get results. This seems suboptimal. I'm probably missing something.
  • It's probably worth calling out specifically that -n <count> limits the shown instructions. That wasn't immediately clear.

Thanks.

jayanderson avatar Jul 11 '16 05:07 jayanderson

The profiled binary comes from the build command.

Normally, rust benchmarks are separate binaries running with or without the --bench flag. This means, at least for now, you can profile benchmarks using the --bin flag (optionally with command line arguments via --)

MagaTailor avatar Jul 13 '16 22:07 MagaTailor