Execution Times

Hi Folks

I am trying ANTS for the first time and have a question about execution times.

In my list of slowest items, the top one indicates it is run once and takes 41 seconds. The problem with this is the entire time I had the application open was less than 30 seconds, making this value seemily impossible.

Is this occuring b/c of it being such a short test?



  • Hi Clayton,

    Sorry you have had these problems. The behaviour you are describing can happen for several reasons.

    In ANTS Profiler 3 we only sample the CPU speed once, modern CPU's have a tendency to change speed to save power and this can throw out the numbers shown in the UI when we convert from clock ticks to seconds.

    The second reason for this can be if you have a very tight loop the profiler's overhead calculations can get skewed and once again we can display a slightly odd number.

    The relative speeds of methods/lines will be accurate though.

    The final reason for this happening is if you have several threads all calling that method where by the total wall clock time can end up being greater than the total runtime (3 threads running for 5 seconds = 15 seconds even if the app is only running for 5 seconds in total).

    If your problem is due to either of the first two reasons (or you are just curious) you might want to give our Early Access Program of ANTS Profiler 4 a try: http://www.red-gate.com/messageboard/viewforum.php?f=80. There are some quite radical changes to the profiler in there and fixes for many of the problems caused by newer CPU's.

    We would love any feedback about ANTS Profiler 4 you have..

    Hope this helps,

    James Moore
    Head of DBA Tools
    Red Gate Software Ltd
Sign In or Register to comment.