Context
When I was trying to run a Criterion.rs
benchmark as a standalone binary, I carried out the following steps:
- Run
cargo bench
. This shows me the path to the binary (target/release/...
):> cargo bench --features dhat-heap --bench smallvec-vs-vec "copy_slice" Finished bench [optimized + debuginfo] target(s) in 0.05s Running benches/smallvec-vs-vec.rs (target/release/deps/smallvec_vs_vec-e6e8e56958d6365b)
- After invoking it, I realized it requires the
--bench
flag to actually run the benchmark../<binary-path> --bench
. Otherwise it wouldn't run.
Question
If faced with a similar problem (trying to figure out the binary invocation) I would like to use the right tool for it.
I tried using dtruss
, so I can see the binary invocation via syscall execve
. However, after running dtruss
, nowhere in my output there is the binary invocation: target/release/deps/...
.
What I'm wondering is whether I'm using the right tool (dtruss?) or if it is, what flags I should be using instead.
Here's the way I setup dtruss:
<cargo-cmd> & # get the pid from here.
sudo dtruss -p <pid> 2>&1 | grep target/release