Time vs. cpu time

ClauspClausp Posts: 6
Hi Red-gate

I have tested your profiler a bit on a web application that use threads a lot, which often sleep to wait for external ressources to finish.
Now when I use your profiler, it tells me that my application spend a lot of time in the functions that sleep(), which I already knew and can't optimize.

On the server I can see that the application often takes a lot of CPU ressources, but it's hard for me to figure out which lines of code that used most cpu ressources when you profiler uses human time to calculate time spent.

It would be great if your profiler used cpu time instead if possible. This way I would be able to see the actual cpu resssources used.

Maybe this article from the code project can help:
http://www.codeproject.com/csharp/processescpuusage.asp

Thanks in advance.
Claus Pedersen

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Claus,

    ANTS Profiler can show 'ticks', but this is hidden and you have to add it to the all methods panel using the 'choose columns' function. The full list of columns available via the column chooser is documented here.
  • Hi Claus,

    ANTS Profiler can show 'ticks', but this is hidden and you have to add it to the all methods panel using the 'choose columns' function. The full list of columns available via the column chooser is documented here.

    I know that, but ticks is not very different from milliseconds, because it still shows how long time (in ticks) the application has spend in a function - not how many cpu ressources it has taken.

    /Claus
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    I've been told that the Ticks metric in ANTS Profiler only increments when the method is doing processing and only very minimally when you have a sleeping thread. I'll double-check, but ticks are supposed to reflect how much processor time a function had used.
  • Ok.

    Currently I have an issue where the server goes in 100% cpu.
    I have found out that is was dure to a error loop. The error handler was called a huge number of times, but took no time (according to the profiler). But the server went 100% anyway.

    /Claus
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Claus,

    It does sound as if the process being profiled is crashing for some reason. Possibly this is causing the jump in CPU, as the process is being removed and resources are being reclaimed. That sort of activity wouldn't be evident looking at a set of profiling results.
Sign In or Register to comment.