Development only

Only available in the development environment.

Hook Profiler measures how much time the server and the client spend in each hook. It wraps hook.Call to add up the run time and the number of calls of every hook, and the server sends its numbers to the clients once a second. The client draws the totals and the slowest hook of both sides on the HUD, and the fl_profiler_toggle console command opens a window that lists the hooks of the server. The plugin does nothing when DBugR is installed.

Summary

Hooks

Draws the total hook run time and the slowest hook of the server and of the client.

Methods

Returns the profiler data: clientside data gathered since the last update from the server, and the serverside data received with that update.

Hooks

Profiler:HUDPaint()

client plugins/sh_profiler.lua:99

Draws the total hook run time and the slowest hook of the server and of the client.

Methods

Profiler:get_metrics()

client plugins/sh_profiler.lua:94

Returns the profiler data: clientside data gathered since the last update from the server, and the serverside data received with that update. Clientside only.

Returns

  • Map clientside run time in seconds by hook name
  • Map clientside call counts by hook name
  • Map serverside run time by hook name
  • Map serverside call counts

Defined in