Skip to content
PRXPHET edited this page May 27, 2025 · 1 revision

Tracy

Tracy is a real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.

Tracy supports profiling CPU, GPU, memory allocations, locks, context switches, automatically attribute screenshots to captured frames, and much more.

More details in the Tracy repository.

Tracy

Instructions for use

  1. Take the engine from the latest release with the ReleaseTracyProfiler configuration OR build it yourself with uncommented Tracy preprocessors in the Engine_properties.props and Engine_lib_properties.props files.
  2. Download the Tracy Profiler via this link.
  3. Run the engine and tracy-profiler.exe.
  4. The engine process will be highlighted in tracy-profiler.exe, wait and soon the profiler will start.

Profiler can be restarted and reconnected at any time.

Tracy in Lua

To set zones in Lua scripts:

function some_function()
    tracy.ZoneBegin()

    -- doing something

    tracy.ZoneEnd()
end

or

function some_function()
    tracy.ZoneBeginN("Zone name")

    -- doing something

    tracy.ZoneEnd()
end

You can also add this code to _G so that the game does not crash when there are no Tracy exports in Lua (on Release engine configuration for example):

if not tracy then
    tracy = {}
    tracy.ZoneBegin = function() end
    tracy.ZoneBeginN = function() end
    tracy.ZoneEnd = function() end
end
Clone this wiki locally