cmyr / cargo-instruments

A cargo plugin to generate Xcode Instruments trace files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No `--test` flag

Schaeff opened this issue · comments

I'm just curious why this tool does not have a --test flag to analyse tests?

Cheers!

iirc I looked into this, but cargo builds tests differently and it would have been a reasonable amount of work to make it work. If you need to test a simple case it should be easy enough to just create an example binary and profile that?

It seems like tests are run in separate threads, with a smaller stack, which was causing the issue for me. That's why I wanted to see what was going on in the test itself. But yes, I found a workaround similar to what you suggested. Feel free to close this.

If you're interested in writing a patch I'd be happy to merge but I don't think I'll get around to doing it myself anytime soon. Glad you figured out a workaround!

Would also be interested in having this. Just a little less friction. flamegraph was able to make it work for their tool. Maybe some hints can be drawn from their approach?