Home arrow FAQ arrow LTProf Frequently Asked Questions arrow Time required to sample
Oct 23, 2017 at 05:43 PM
Contact Us
Time required to sample

The most frequently asked question at the first contact with the sampling technique is "How long do I have to leave the profiler running?". To answer this you must first understand how LTProf works:

LTProf runs side-by-side with your application and it collects information about it by 'peeking' at its current state of execution. The longer it runs the more data it collects. However when a certain coverage has been reached, the collected data becomes statistically significant, which means that collecting even more will not change the percentages. Unfortunately this significance cannot be calculated automatically because it depends on what your program does. Also, it is different from function to function.

Fortunately the data is gathered quickly enough so that statistical significance is achieved within seconds in many cases. Even when LTProf did not run long enough the most executed functions will have the most detail, and the least executed will loose accuracy starting with line-level information.

When profiling you will want to achieve a balance between the following:

  • Quality: better sampling resolution and longer profiling times will give better visibility on program's performance.
  • Resources: leaving the profiler running too long will result in a volume of information which takes longer to process but is not necessarily more relevant. Statistically speaking there is a point beyond which more information does not imply more accurate reports.

All these being said you'll find that many applications need to be profiled for around one minute, but some will require up to ten.

Copyright (C) 2002-2009 Lightweight Technologies LLC. All rights reserved. Read our Privacy Policy