Script Profiling

From Bohemia Interactive Community
Jump to navigation Jump to search

Script Profiling allows to profile script performance while it is running.

In-Game Profiler

Enable the in-game profiler from the Diag Menu > Statistics > Script Profiler - the value can be set to frame or continuous.

External Profiler

Allow an external profiler by either:

In the profiler tool look for the "Scr::" prefix, or expand "#Main thread" in the stack view.

Memory Allocation

It is possible to dump all allocations from script:

  • Run the game with the -checkInstance startup parameter
  • Call the following from script: DumpInstances(/* bool csvFormatting = */ true);
  • This outputs memory allocations in the logs to the CSV format Show example