Using Unit Tests to drive the Profiler
I have several operations that take a long time, and I'm trying to determine what exactly the bottleneck is.
I have created tests using the testing infrastructure that allow me to run the same operation over and over, so I can see trends in how long the operation is taking.
What I really want to do is have the Profiler run while the Tests are running, so that I can figure out what portions of the code are taking a long time. So far, I can't figure out how to do this.
How can I maket his work?
--
Chris Mullins
Hey Chris,
Once you have run your tests and see the results in the Test Results window, try right-clicking on a single test. You should see a create performance session option on the context menu. I think this is what you want.
If you want to profile more than one test at a time, you will need to create an ordered test to wrap the multiple tests. You should then be able to profile the ordered test. There is currently no method of adding multiple tests to the same performance session which is why creating the ordered test is necessary (although we are looking into this for the future).
I hope this helps. Let me know if you get this working.
Marc