Skip to content

Profiling

Voltstro edited this page Jul 10, 2020 · 1 revision

Profiling is an important tool to know were all the engine's time is spent.

  1. Note that you will need a copy of the engine that has profiling enabled, by default the debug builds do have it.
  2. The profiling files can get quite large quickly

You can profile a certain function by using:

ProfilerTimer.Profile(() =>
{
    //Do your code here...
});

Viewing the reports

You will need a chrome based browser to do this (E.G: Chrome, Edge, Opera) Sorry Firefox users...

Then head to chrome://tracing

The reports a placed at the root, where the engine code is. There are three files, VoltstroEngineProfile-Startup.json, VoltstroEngineProfile-Runtime.json, VoltstroEngineProfile-Shutdown.json.

You can drag the reports into the tracing page and view the data there.

Clone this wiki locally