Question

I start to evaluate Red Gate's ANTS Profiler to profile my WPF application.

I read through the online support/documentation and can't seem to find explanation for the basics (and I don't know why they are not in the documentation):

In the profiler, it shows Time and Hit Count of Method. Why is Time has unit of %? Shouldn't it be second? I try to add up all the percentage but they don't add up to 100. The Time with Children has also unit in %, which adds up more than 100%. I cannot tell whether they are time or portion of something.

What is Hit Count? What is "hitting" my application and what hit is being count?

I know I sound very retarded, but without understanding Time and Hit Count I can't being reading the forum or online help.

Was it helpful?

Solution

From the RedGate documentation:

The following data is shown for each method within the stack trace, for the selected time period:

Time: the total execution time for the method within this stack trace.

Time With Children: the total execution time for the method and all its children within this stack trace.

Hit Count: the number of times the method was called within this stack trace.

OTHER TIPS

Matthew's earlier answer is correct. To expand on it:

When you view time in percentages, the % time for each method represents the proportion of the total execution time for the selected period that the method contributed.

If you prefer to see time in seconds, click on View, then select Ticks, Milliseconds, or Seconds.

The total time can sum to more than 100% if you have more than one CPU.

The question about hit count is a bit more puzzling - it should indeed show how many times the method was called in the selected time period. If you're sure the hit count you're seeing is higher than it should be, it's probably worth contacting Red Gate support - support@red-gate.com .

I hope this helps!

I haven't done all the calculations, but I think the time % is the average of one "hit" to the method. My guess is when you multiply the hit count with the Time% and sum them up, you get the 100%.

It would be the same with Time With Children but a lot more complex to calculate because you have to take into account many more methods.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top