1 / 5

Profiling

Profiling. Where does my application spend the time?. Profiling: W hat, 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

genero
Download Presentation

Profiling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Profiling Where does my application spend the time? Profiling

  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 Profiling

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

  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 Profiling

  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 Profiling

More Related