Stragglers CPU Profiler

Addons
617 Downloads Last Updated: Sep 10, 2017 Game Version: 7.3.0

Profiler for World of Warcraft

A profiler for WoW addons that tries to go deeper.

 

Note: you must currently set CVar "scriptProfile" to "1" manually before using. Enter '/run SetCVar("scriptProfile", "1")' in the chatbox and reload the interface.

 

For users

Find out which addons...

  • Are increasing your startup times the most.
  • Have the heaviest CPU-cost while the game is running.

For developers

Shows the total CPU used and times called for all found functions in the global namespace and groups them by addon structure.

There is not much that can be done to track locals automatically, but addon authors can easily improve functionality by exposing local tables globally like so:

if Profiler then _G.PublicTable = privateTable end

As an experimental feature, the Profiler can try to find out callers to functions. This is currently done with plain brute force by hooking the function, throwing an error and parsing the debugstack. As you might expect this is far too heavyweight to do automatically. The recommended approach is to do the following in your source:

local monitor = profilingmonitor or function(f) return f end
local CreateFrame = monitor(_G.CreateFrame)

There will be support for figuring out where in a function the time is spent in the future that will work much like debugging prints - there is no reasonable way to do this automatically.

Comments

Posts Quoted: