KLHPerformanceMonitor

From Turtle WoW Wiki
Revision as of 12:24, 9 August 2025 by >Basedturtle
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

KLHPerformanceMonitor tracks the memory creation and CPU usage of all the mods running. You can print out a list of the top 10 mods, for memory usage or CPU time, in total or in the last 30.

Installation

Manual Installation only

  1. Go to the main page of the repository.
  2. Click the <> Code dropdown and download the repository as a .zip.
  3. Extract the .zip file, move the KLHPerformanceMonitor folder from inside the KLHPerformanceMonitor_v3.1 folder to your Interface/AddOns directory
  4. Restart the game.


Git Links


Commands

Command Description
/kpm load Start the performance monitor
/kpm time total Display total CPU time since activation
/kpm time recent Display recent CPU time (last ~30 seconds)
/kpm memory total Show total memory used since start
/kpm memory recent Show memory used in last ~30 seconds


How to Use

Enabling and Starting the Monitor

  • To start monitoring, type: /kpm load This activates data collection and takes a few seconds to gather initial stats.

Viewing Performance Data

  • To see CPU time usage: /kpm time total — Shows total CPU time since monitoring started. /kpm time recent — Shows CPU time over the last ~30 seconds.
  • To see memory usage: /kpm memory total — Shows total memory used since monitoring started. /kpm memory recent — Memory used in the last ~30 seconds.


Preview

Memory Total:


Time Total:


How It Works

  • The addon hooks into all UI frames' OnUpdate and OnEvent handlers.
  • It groups frames by their initial name segments (e.g., "KLHTM", "CT_RA", "DUF_") to categorize resource usage.
  • It provides a list of the top 10 categories/mods consuming resources, showing:
    • The rank (1-10)
    • The category/mod name
    • An example frame name in that category
    • The current resource usage (time in ms or memory in KB)


Important Notes

  • Performance Impact: Because it hooks many frames (~3000), it may slow down your system slightly.
  • Default State: Disabled for performance reasons; activate with /kpm load.
  • Data Grouping: Frames are grouped based on the first few characters of their names, helping you identify resource-heavy addons or mods.