Profiling - Inclusive vs Exclusive average

Okay, so here’s what I could figure out by a little bit of experimentation:

First, you have to differentiate if you have a single frame selected or multiple.

For a single selected frame:

  • Inclusive time tells you the total amount of time spent in this function in this frame, across every call to this function and including child function calls.
  • Exclusive time doesn’t tell you anything, but you can still get the exclusive time by looking at the inclusive time of Self.

For multiple selected frames:

  • Inclusive time tells you the average amount of time spent in this function across all selected frames. This average takes into account all calls to this function and child function calls from each selected frame.
  • Exclusive time tells you the total amount of time spent in this function across all selected frames, excluding child function calls. You can get the average exclusive time by looking at the inclusive time of Self (You’ll notice that the Exclusive Time(%) is the same as the Inclusive Time(%) of Self(*)).

I was very annoyed that this just isn’t explained anywhere, so I hope this clears things up.

(*) The percentages only match if all events are shown, as the Inclusive Time(%) is adjusted when you filter events to always add up to 100% of the calling function.

9 Likes