Profilers

Submitted by epreisz on Sun, 02/11/2007 - 08:19.

Profilers are the most common tools we think of when discussing optimization. A profiler gathers information about our CPU usage during a profiling session. Most often, we use a profiler to give us information about the amount of time we are spending in a given section of code.

Some profilers are very general and only give us a high level of information; other profilers gather very specific data and report many views of the data collected during a run. However you may view the data, a profiler will collect information about time spent and events that occurred. Below are some common terms that we might encounter while using a profiler.

Self time: The amount of time spent in a given function excluding subsequent function calls contained within the given function.

Total time: The amount of time spent in a given function of code including subsequent function calls contained within the given function

Calls: A count of the number of calls made during the lifetime during profiling session.

Total wait time: Time spent in a function while its thread was suspended.