企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
Note: CPU profiling is disabled by default since it has some overhead. CPU profiling is controlled by the[scriptProfile](https://wow.gamepedia.com/CVar_scriptProfile "CVar scriptProfile")cvar, which persists across sessions, and takes effect after a UI reload. Memory profiling is always available. These functions have been added in Patch 2.1. [GetAddOnCPUUsage](https://wow.gamepedia.com/API_GetAddOnCPUUsage "API GetAddOnCPUUsage")(index or "name") - Returns the total time used by the specified AddOn. This returns a cached value calculated by UpdateAddOnCPUUsage(). [GetAddOnMemoryUsage](https://wow.gamepedia.com/index.php?title=API_GetAddOnMemoryUsage&action=edit&redlink=1 "API GetAddOnMemoryUsage (page does not exist)")(index or "name") - Query an addon's memory use (in K, precision to 1 byte) - This returns a cached value calculated by UpdateAddOnMemoryUsage(). [GetEventCPUUsage](https://wow.gamepedia.com/index.php?title=API_GetEventCPUUsage&action=edit&redlink=1 "API GetEventCPUUsage (page does not exist)")(\["event"\]) - Returns the time used and number of times the specified event has been triggered. If 'event' is omitted, the time and count will be totals across all events. [GetFrameCPUUsage](https://wow.gamepedia.com/API_GetFrameCPUUsage "API GetFrameCPUUsage")(frame\[, includeChildren\]) - Returns the time used and number of function calls of any of the frame's script handlers. If 'includeChildren' is true or omitted, the time and call count will include the handlers for all of the frame's children as well. [GetFunctionCPUUsage](https://wow.gamepedia.com/index.php?title=API_GetFunctionCPUUsage&action=edit&redlink=1 "API GetFunctionCPUUsage (page does not exist)")(function\[, includeSubroutines\]) - Returns the time used and number of times the specified function was called. If 'includeSubroutines' is true or omitted, the time includes both the time spent in the function and subroutines called by the function. If it is false, then time is only the time actually spent by the code in the function itself. [GetScriptCPUUsage](https://wow.gamepedia.com/index.php?title=API_GetScriptCPUUsage&action=edit&redlink=1 "API GetScriptCPUUsage (page does not exist)")() - Returns the total time used by the scripting system. [ResetCPUUsage](https://wow.gamepedia.com/index.php?title=API_ResetCPUUsage&action=edit&redlink=1 "API ResetCPUUsage (page does not exist)")() - Reset all CPU profiling statistics to zero. [UpdateAddOnCPUUsage](https://wow.gamepedia.com/index.php?title=API_UpdateAddOnCPUUsage&action=edit&redlink=1 "API UpdateAddOnCPUUsage (page does not exist)")() - Scan through the profiling data and update the per-addon statistics. [UpdateAddOnMemoryUsage](https://wow.gamepedia.com/index.php?title=API_UpdateAddOnMemoryUsage&action=edit&redlink=1 "API UpdateAddOnMemoryUsage (page does not exist)")() - Scan through memory profiling data and update the per-addon statistics.