arsa
2.7
|
Code-profiler. Please check the example in the Irrlicht examples folder about how to use it. More...
#include <IProfiler.h>
Public Member Functions | |
IProfiler () | |
Constructor. You could use this to create a new profiler, but usually getProfiler() is used to access the global instance. More... | |
virtual | ~IProfiler () |
void | add (s32 id, const core::stringw &name, const core::stringw &groupName) |
Add an id with given name and group which can be used for profiling with start/stop. More... | |
s32 | add (const core::stringw &name, const core::stringw &groupName) |
Add an automatically generated for the given name and group which can be used for profiling with start/stop. More... | |
u32 | getProfileDataCount () const |
Return the number of profile data blocks. There is one for each id. More... | |
bool | findDataIndex (u32 &result, const core::stringw &name) const |
Search for the index of the profile data by name. More... | |
const SProfileData & | getProfileDataByIndex (u32 index) const |
Get the profile data. More... | |
const SProfileData * | getProfileDataById (u32 id) |
Get the profile data. More... | |
u32 | getGroupCount () const |
Get the number of profile groups. Will be at least 1. More... | |
const SProfileData & | getGroupData (u32 index) const |
Get profile data for a group. More... | |
bool | findGroupIndex (u32 &result, const core::stringw &name) const |
Find the group index by the group-name. More... | |
void | start (s32 id) |
Start profile-timing for the given id. More... | |
void | stop (s32 id) |
Stop profile-timing for the given id. More... | |
void | resetDataById (s32 id) |
Reset profile data for the given id. More... | |
void | resetDataByIndex (u32 index) |
Reset profile data for the given index. More... | |
void | resetGroup (u32 index) |
Reset profile data for a whole group. More... | |
void | resetAll () |
Reset all profile data. More... | |
virtual void | printAll (core::stringw &result, bool includeOverview=false, bool suppressUncalled=true) const =0 |
Write all profile-data into a string. More... | |
virtual void | printGroup (core::stringw &result, u32 groupIndex, bool suppressUncalled) const =0 |
Write the profile data of one group into a string. More... | |
Protected Member Functions | |
u32 | addGroup (const core::stringw &name) |
Protected Attributes | |
ITimer * | Timer |
core::array< SProfileData > | ProfileDatas |
core::array< SProfileData > | ProfileGroups |
Code-profiler. Please check the example in the Irrlicht examples folder about how to use it.
Definition at line 101 of file IProfiler.h.
|
inline |
Constructor. You could use this to create a new profiler, but usually getProfiler() is used to access the global instance.
Definition at line 105 of file IProfiler.h.
|
inlinevirtual |
Definition at line 108 of file IProfiler.h.
|
inline |
Add an id with given name and group which can be used for profiling with start/stop.
After calling this once you can start/stop profiling for the given id.
id | Should be >= 0 as negative id's are reserved for Irrlicht. Also very large numbers (near INT_MAX) might have been added automatically by the other add function. |
name | Name for displaying profile data. |
groupName | Each id belongs into a group - this helps on displaying profile data. |
Definition at line 346 of file IProfiler.h.
|
inline |
Add an automatically generated for the given name and group which can be used for profiling with start/stop.
After calling this once you can start/stop profiling with the returned id.
name | Name for displaying profile data. |
groupName | Each id belongs into a group - this helps on displaying profile data. |
Definition at line 329 of file IProfiler.h.
|
inlineprotected |
Definition at line 377 of file IProfiler.h.
|
inline |
Search for the index of the profile data by name.
result | Receives the resulting data index when one was found. |
name | String with name to search for |
Definition at line 386 of file IProfiler.h.
|
inline |
Find the group index by the group-name.
result | Receives the resulting group index when one was found. |
name | String with name to search for |
Definition at line 409 of file IProfiler.h.
|
inline |
Get the number of profile groups. Will be at least 1.
NOTE: The first groups is always L"overview" which is an overview for all existing groups
Definition at line 152 of file IProfiler.h.
|
inline |
Get profile data for a group.
NOTE: The first groups is always L"overview" which is an overview for all existing groups
Definition at line 159 of file IProfiler.h.
|
inline |
Get the profile data.
id | Same value as used in ::add |
Definition at line 400 of file IProfiler.h.
|
inline |
Get the profile data.
index | A value between 0 and getProfileDataCount()-1. Indices can change when new id's are added. |
Definition at line 140 of file IProfiler.h.
|
inline |
Return the number of profile data blocks. There is one for each id.
Definition at line 127 of file IProfiler.h.
|
pure virtual |
Write all profile-data into a string.
result | Receives the result string. |
includeOverview | When true a group-overview is attached first |
suppressUncalled | When true elements which got never called are not printed |
|
pure virtual |
Write the profile data of one group into a string.
result | Receives the result string. |
groupIndex_ |
|
inline |
Reset all profile data.
NOTE: This is not deleting id's or groups, just resetting all timers to 0.
Definition at line 455 of file IProfiler.h.
Reset profile data for the given id.
Definition at line 423 of file IProfiler.h.
Reset profile data for the given index.
Definition at line 432 of file IProfiler.h.
Start profile-timing for the given id.
This increases an internal run-counter for the given id. It will profile as long as that counter is > 0. NOTE: you have to add the id first with one of the ::add functions
Definition at line 281 of file IProfiler.h.
Stop profile-timing for the given id.
This increases an internal run-counter for the given id. If it reaches 0 the time since start is recorded. You should have the same amount of start and stop calls. If stop is called more often than start then the additional stop calls will be ignored (counter never goes below 0)
Definition at line 292 of file IProfiler.h.
|
protected |
Definition at line 215 of file IProfiler.h.
|
protected |
Definition at line 216 of file IProfiler.h.
|
protected |
Definition at line 214 of file IProfiler.h.