Profiling
When working with real-time products such as CryENGINE, programmers constantly have to consider the performance of their code. To aid in this, we'll be able to use the profile
console variable.
The CVar allows for getting visual statistics on the most intensive parts of your code as shown in the following screenshot:
In the previous screenshot, profile was set to 1
, the default mode, which sorts the most intensive functions being called for each frame.
Profile usages
Currently, the profile variable supports 13 different states as listed in the following table:
Value |
Description |
---|---|
0 |
Default value; when this is set, the profiling system will be inactive. |
1 |
Self time |
2 |
Hierarchical time |
3 |
Extended self time |
4 |
Extended hierarchical time |
5 |
Peaks time |
6 |
Subsystem info |
7 |
Calls number |
8 |
Standard deviation |
9 |
Memory allocation |
10 |
Memory allocation (in bytes) |
11 |
Stalls |
-1 |
Used to enable the profiling system, without drawing information to the screen. |