Benchmarking/Profiling tests

I have a test that is suddenly take a very long time. CPU utilization
drops to zero and then resumes like 45-60 seconds later.

So I am looking for a way to find out why. I basically want to run the
profiler script, but on my test rather than any single method. This
should let me see what methods are getting stuck.

Is this possible?