bheisler / iai

Experimental one-shot benchmarking/profiling harness for Rust
Apache License 2.0
578 stars 23 forks source link

Question: Current Working Directory for iai benchmarks? #17

Open llogiq opened 3 years ago

llogiq commented 3 years ago

Hi there! I have an operation I want to benchmark which accesses a directory within the environment. What is the current working directory the benchmarks are run in?

Also I seem to get errors on running my benchmark code (presumably while trying to write to stdout) – is there a way to get backtraces on panic from the benchmarked code?

llogiq commented 3 years ago

So by experimentation I found out that the current working directory is the target path of the crate. I got visibility into the error by copying the code into an example and running that directly.

bheisler commented 3 years ago

I'm going to reopen this as a note to myself to figure out what the CWD should be and document that.