WoW API < GetFrameCPUUsage

Returns the total time used by and number of calls of a frame's event handlers.

time, count = GetFrameCPUUsage(frame[, includeChildren])

Arguments[edit | edit source]

(frame[, includeChildren])
Frame - Specifies the frame.
Boolean - If false, only event handlers of the specified frame are considered. If true or omitted, the values returned will include the handlers for all of the frame's children as well.

Returns[edit | edit source]

time, count

Number - The total time used by the specified event handlers, in milliseconds.
Number - The total number of times the event handlers were called.

Details[edit | edit source]

The values returned are just the sum of the values returned by GetFunctionCPUUsage(handler) for all current handlers. Which means that it's not per-frame values, but per-function values. The difference is that if for example an OnUpdate handler is used by two frames A and B, and, say, B:OnUpdate() is called, both A and B get blamed for it.
It also means that if a frame's handlers change, the CPU used by the previous handlers is ignored, because only the current handlers are considered.
Community content is available under CC-BY-SA unless otherwise noted.