The Profiler window provides various ways of measuring game performance and helps the optimization process. It can be used to collect data about game performance right in the Editor.
Profiler window is divided into 3 parts:
- Toolbar
- Sections list
- Details panel
The general profiling mode with major game performance charts and stats.
The CPU performance profiling mode.
To add code section to be included in profile blocks use the following code:
Profiler.BeginEvent("MyFunction");
// do something
Profiler.EndEvent();
#include "Engine/Profiler/Profiler.h"
PROFILE_CPU_NAMED("MyFunction"); // or PROFILE_CPU to use auto-name of the current function
// do something
The GPU performance profiling mode.
To add code section to be included in profile blocks use the following code:
Profiler.BeginEventGPU("MyFunction");
// do something on GPU with GPUContext
Profiler.EndEventGPU();
#include "Engine/Profiler/Profiler.h"
PROFILE_GPU("MyFunction"); // or PROFILE_GPU_CPU to inject both CPU and GPU profile event
// do something on GPU with GPUContext
The memory profiling mode focused on breaking down system memory allocations. This includes separate stats for native memory allocation and managed C# allocations.
The network data transfer sends/receives charts over game time. When using high-level networking it displays RPC methods and replication packets sent from the Editor to other peers.