The profile module contains the following logical groups:
Profiling data can be accessed in different ways:
High level profiling can be done both timer based and logical. An example for a logical profile would be the number of texture changes per frame or the number of triangles rendered.
The hierarchy is enforced by using a hierarchical naming scheme. For timer based profiles this hierachy is build automatically, for logical profiles each profile must be named accordingly when being created.
High level profiling is available in all build configurations. All high level profile functions are optimized for speed (at least while profiling is disabled) so that there is an almost zero cost for having profiling in all configurations.
Function level profiling determines general call statistics, e.g. call count per frame/total, time spent in function, time per call, time spend in function and children, etc.
Function level profiling is available in the 'profile' build configuration only since it relies on the fact that the compiler generates '_penter' function calls at the beginning of each function.
Instead of just providing frame based profiles this module has the concept of profile ranges. A range is a period of time specified by a Begin and and End function call. All data within this range is recorded as a range.
It is possible to capture to more than one active range at the same time.
Ordinary frame capturing can be achieved by recording a range back-to-back.
Using ranges makes it very easy to profile logically connected events, e.g. profiling a level load time.
This module provides a Debug Module command interface called 'profile'. The commands in this command interface are basically: