Lore archive · Warcraft Wiki, 2023 dump
API GetFrameCPUUsage
Last wiki revision 2022-07-22
Returns the total time used by and number of calls of a frame's event handlers. time, count = GetFrameCPUUsage(frame[, includeChildren])
- frame:Frame - Specifies the frame.
- includeChildren: - 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.
- time: - The total time used by the specified event handlers, in milliseconds.
- count: - The total number of times the event handlers were called.
- 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 OnEvent handler is used by two frames A and B, and, say, B:OnEvent 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.
- Note that OnUpdate CPU usage is NOT included at all (tested at 6.0.3)
Source
https://warcraft.wiki.gg/wiki/API_GetFrameCPUUsage · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.