When using Guiliani you will have various profiling-options available for your application:
The central object to use profiling in your application is CGUIProfiler. Here you can activate different profiling-options. The output can be the screen and/or the console.
There are two different output-modes:
Profiling CPU-Usage is activated by using GETPROFILER.SetCPUUsageActive()
Profiling Memory-Consumption is activated by using GETPROFILER.SetMemoryProfilingActive() Memory-Profiling in Guiliani will use the MemLeakDetection-feature of Guiliani which will track all memory-allocations and -deallocations.
Depending on the available features of your platform there are two scenarios:
both profiling-options will differ in the actual usage they will display. this is due to the fact that when using globally redefined new-/delete-operators ALL memory will be count. Compared to the included-based option which will only redefine new-/delete-operators for this module.
Profiling Invalidations (i.e. marking the areas of the screen which have been redrawn) is activated by GETPROFILER.SetInvalidationActive() If activated it will mark all areas which have been redrawn in alternating colors, so you can see it there has been recently a redraw of this area.
Profiling Graphics is activated by using GETPROFILER.SetGraphicsProfilingActive() and will tell you how much has been necessary for Redraw and Refresh.
To modify the on-screen-display of profiling the following is available
Additionally to the text which is displayed on the screen you can activate the memory-bar which will show the currently used and maximum memory. To activate it use GETPROFILER.SetMemoryUsageBarActive(). The position and size can be set seperately with SetMemoryUsageBarPosition() and SetMemoryUsageBarSize()
The following example shows the constructor of a class CMyGUI that is derived from CGUI: