Frank’s Weblog

Old enough to know better, young enough to not care

EventTracker (1.2)

Description


Event Tracker allows you to view detailed information such as argument information of tracked events/functions as well as what frames are monitoring specific event. For functions tracked it will also provide information on the time spent on execution functions (on a call per call base as well as the total execution time).

Setup


Edit the file named EventTracker_events.lua to specify the events that should be tracked by Event Tracker.

-- Events to be tracked
    ET_TRACKED_EVENTS = {
        "ACHIEVEMENT_EARNED",
        "ACTIONBAR_PAGE_CHANGED",
        "ACTIONBAR_SLOT_CHANGED",
        ..
        "ZONE_UNDER_ATTACK"
    };

Be sure to only specify valid event names. The Blizzard function GetFramesRegisteredForEvent will cause WoW to instantly crash if the function is used with an non-existing event.


Slash commands


EventTracker supports the following list of slash commands

/et - open/close EventTracker dialog
/et { help | ? } - Show the list of available commands
/et add <event> - Add event to be tracked *
/et remove <event> - Remove event to be tracked *
/et registerall - Register all events to be tracked *, **
/et unregisterall - Unregister all events to be tracked (except for VARIABLES_LOADED) *
/et resetpos - Reset position of the main EventTracker frame

* – Adding/Removing events using the slash commands does not change the information displayed by ‘Events/Functions tracked’.
** – This is done by calling the Blizzard function RegisterAllEvents(). It does not know how many or which events are registered.


API


It is also possible to track specific LUA functions enabling you to determine how often a certain function gets called and how much execution time is involved. Time information is available for each call to a function and as a total of all calls done to the function.

To specify which functions should be tracked the following API is available

EventTracker_TrackProc( procname, arginfo )

procname
  String, Name of the function to be tracked

arginfo
  Table – (Optional) Table of argument names of function to be tracked

The following example enables tracking of the Blizzard function GameTooltip_ShowStatusBar

EventTracker_TrackProc( "GameTooltip_ShowStatusBar", { "self""min""max""value""text" } );

It would also be possible to use the following command (no arginfo), but then Event Tracker will display ‘***’ as argument names. The example above will show the proper argument name for each of the arguments, making interpreation of the information easier.

EventTracker_TrackProc( "GameTooltip_ShowStatusBar" );

Be sure to only call EventTracker_TrackProc once for any function. Using the function multiple times for a function will result in errors and or crashes depending on the function being tracked.


Event information


Event overview

On/Off – Turn on or off tracking (saved accross sessions)
Purge – Purge all collected data
Close – Close the Event Tracker window
Show details >> | Hide details << – Show or hide the detail panel

By clicking on a line of data additional information will be presented within the Events details window. If the detail window is not open, it will be opened automatically.


Event details


Event details

- ‘Title’ shows the name of the event/function selected, the value between brackets indicates the number times an event is triggered or function has been called (since the last purge action)
- ‘Arguments’ lists all of the arguments and the values available for the selected event. If the argument name is not known ‘***’ will be displayed
- ‘Registered by’ provides a list of named and unnamed frames that have been registered to receive the selected event
- ‘Time (current)’ notes the amount of time spent to process the selected function
- ‘Time (total)’ notes the total amount of time spent to process all calls to the selected function

Note: Timing information is only available for functions that are being track, not for events. For events 0.00 ms will be shown for both ‘Time (current)’ and ‘Time (total)’.

Dependencies


EventTracker has no dependencies with other AddOns.


Installation instructions


To install EventTracker follow the following easy steps

  1. Download the latest version of EventTracker
  2. Extract the downloaded ZIP-file to a folder on your hard drive
  3. Move the resulting folder called ‘EventTracker’ (and its contents) to your AddOns-folder

    The location of the AddOns-folder differs per platform, the follow reflect the default locations
      PC: C:\Program Files\World of Warcraft\Interface\AddOns\
      Mac: /Macintosh HD/Applications/World of Warcraft/Interface/AddOns/

    Note: If this is your first Addon you will need to create the folders ‘Interface’ and ‘AddOns’ first

  4. Restart World of Warcraft. On the character selection screen a button titled ‘AddOns’ should appear. Click on this button to check if EventTracker is available and that it is checked to be loaded.
  5. If all is well load your character of choice (from the character selection screen) to start enjoying your new Addon


Downloads


File name Version Size Date
EventTracker_1.2 1.2 12.4 Kb August 4, 2009
EventTracker_1.1 1.1 11.7 Kb July 15, 2009
EventTracker_1.0 1.0 11.6 Kb June 8, 2009


Version history / Changelog


Version 1.2 – August xx, 2009

  • Changed: Updated for 3.2
  • Added: Added support for slash commands

Version 1.1 – April 10, 2009

  • Fixed: Corrected time calcs for nested calls

Version 1.0 – June 8, 2009

  • First public release


Known issues


None

No comments yet.

Leave a comment

You must be logged in to post a comment.