OnEventWatch
OnEventWatch tracks the performance of OnEvent
handlers, showing how much time they take per frame. It helps identify slow or frequent events, aiding in diagnosing UI and addon performance issues.
Installation
Manual Installation Only
- Download this zip: OnEventWatch_1_2.zip
- Unpack the
.zip
into yourInterface/AddOns
directory and restart the game.
Usage
- To start profiling: Type
/onevent
in the chat window. - First run: The addon will scan all frames and note those with an
OnEvent
handler. It then wraps these handlers with timers (debugprofilestart()
anddebugprofilestop()
) to measure execution time. - Subsequent runs:
/onevent
toggles the profiling window, which displays:- List of frames that received events
- The specific events triggered
- Total and average execution times
- Searching: Use the search boxes at the bottom of the profiling window to filter by frame name or event name (partial matches allowed).
- Minimap Button: Acts as a reminder that OnEventWatch is active and allows toggling the profiling window without typing commands. To remove the button: Delete the
MyMinimapButton.lua
file. - Shift+Click on Events: When the ChatFrameEditBox is open, shift+clicking an event inserts its stats into the chat box for easy copying or comparison.
Preview
Profiling Window
Profiling Window Features
- Displays list of frames with recent
OnEvent
activity. - Shows:
- Frame name
- Event name
- Count of occurrences
- Total time spent
- Average time per event
- Search by frame or event name.
- Sort columns by clicking headers.
- Link: Shift+Click on an entry to copy details into chat (for comparison).
Reset Data:
- Click Reset in the profiling window to clear collected data and reload UI.
Stop Watching:
- Click Stop in the profiling window to remove hooks and reload UI.
Changes
New in 1.2
- Removed redundant 'Refresh' button
- Separated 'Stop' and 'Reset' buttons
- MyMinimapButton change for 1.10.2
- Events shift+clickable to chat (see below)
Patch Notes
- 1.2 (05/04/2006): Changed 'Refresh' to 'Stop', updated Minimap button, added chat linkability
- 1.1 (04/16/2006): Removed garbage collection on sorts, added minimap button, continuous list updates
- 1.0 (04/14/2006): Initial release