Presentation is loading. Please wait.

Presentation is loading. Please wait.

Profiling Where does my application spend the time? Profiling1.

Similar presentations


Presentation on theme: "Profiling Where does my application spend the time? Profiling1."— Presentation transcript:

1 Profiling Where does my application spend the time? Profiling1

2 Profiling: What, why and how Dynamic program analysis (we run the program) Not, static program analysis (we look at the source code) Measure time or space (memory) of a running program Why To optimize your program How Instrumenting the programing using a tool called a profiler Instrumentation example: lots of stop watches After the instrumented program has run you get an analysis report Profiling2

3 Profiling in Visual Studio 1.Open the solution you want to profile 2.Get ready for a profiling session Visual Studio 2013 Menu Analyze -> Performance and Diagnostics Visual Studio 2012 Menu Analyze -> Start Performance Analysis 3.Your program runs 4.You get a report 5.Try to change (optimize) parts of the code Usually you want to optimize the most time consuming parts of the code 6.Re-run, and get a new report Profiling3

4 Visual Studio, reading the profiling report The section “Function Details” is interesting Tells you which method (aka. Function) has spend most time. Even which line(s) in the program has spend most time Example: Gaston Hillar, example 2_11 Profiling4

5 References and further readings Wikipedia: Profiling (computer programming) http://en.wikipedia.org/wiki/Profiling_(computer_programming) MSDN Beginners Guide to Performance Profiling http://msdn.microsoft.com/en-us/library/ms182372.aspx Profiling5


Download ppt "Profiling Where does my application spend the time? Profiling1."

Similar presentations


Ads by Google