iai uses a hardcoded relative path "target/iai/cachegrind.out.{}" for outputs which isn't the correct target directory in some cases. Particularly when you are using a multi-crate workspace (which uses a shared target directory for all crates) and when cargo bench's --target-dir argument is set. I was going to just PR a fix (and I'm happy to do so if we conclude a good way to do it), but I couldn't find an elegant way to fix it. The best I've thought of so far is popping three (release, deps, and the iai- binary) segments off the binary path but I'm not confident that is correct in all cases.
iai uses a hardcoded relative path "target/iai/cachegrind.out.{}" for outputs which isn't the correct target directory in some cases. Particularly when you are using a multi-crate workspace (which uses a shared target directory for all crates) and when cargo bench's --target-dir argument is set. I was going to just PR a fix (and I'm happy to do so if we conclude a good way to do it), but I couldn't find an elegant way to fix it. The best I've thought of so far is popping three (release, deps, and the iai- binary) segments off the binary path but I'm not confident that is correct in all cases.