Boppity Bop
Boppity Bop

Reputation: 10473

How to time each line of code in VS2012 profiler?

From the MSDN it seems the VS2012 profiler can time each line of code but I just couldnt figure how.

I have Visual Studio Ultimate 2012.

I need to profile each line in a method which is running in a thread. Now I only can get a method timing.

Is there a walkthrough on how to profile each line?

P.S. please note - this question is about the profiler which ships with the studio not 3d party profilers.

Upvotes: 3

Views: 1320

Answers (2)

Andrew Hall - MSFT
Andrew Hall - MSFT

Reputation: 159

Are you using instrumentation profiling or CPU sampling? The Visual Studio profiler will show CPU sample counts per line, but it does not collect how long each line takes to run in instrumentation mode

Upvotes: 3

I haven't used it a lot yet, but for me the profiler does identify the calling line in the lower pane when I navigate the call hierarchy of a profiling session in the upper pane in VS.

Upvotes: 0

Related Questions