I'm trying to profile a junit test - all I care about is hot spots and call tree - I want to see where the test is taking time. I'm running the test by right clicking in intellij idea and saying "profile ..." The test runs in less than a second, and then finishes - even if I can get there quick enough to click call tree and click start recording (haven't found any way of getting it recording immediately) - anything I haven't managed to open by the time it finishes is not available, saying things along the lines of "no data was received because the profiled JVM has terminated.
How do I right click and run a test, have it capture all call history and timings in such a way that I can browse it all once the test has completed? (or is there an alternative/better way of doing this?)