PixelLightAPI
.
|
PixelLight profiling system. More...
#include <Profiling.h>
Public Member Functions | |
bool | IsActive () const |
Returns whether the profiling system is active or not. | |
void | SetActive (bool bActive=false) |
Sets whether the profiling system is active or not. | |
String | GetSelectedGroup () const |
Returns the name of the current selected profile group. | |
PLCORE_API bool | SelectGroup (const String &sName="") |
Selects a profile group. | |
PLCORE_API String | SelectNextGroup () |
Selects the next profile group. | |
PLCORE_API String | SelectPreviousGroup () |
Selects the previous profile group. | |
PLCORE_API bool | Set (const String &sGroup, const String &sElement, const String &sText) |
Sets the element text. | |
PLCORE_API String | GetText (const String &sGroup, const String &sElement) const |
Returns the element text. | |
Static Public Member Functions | |
static PLCORE_API Profiling * | GetInstance () |
static PLCORE_API bool | HasInstance () |
PixelLight profiling system.
Adding own groups and elements:
The profiling information could be expand with own information you maybe want to add to inspect the runtime behavior of certain codes. In fact that’s much easier as it may sound first... in real it’s only ONE function called Profiling::GetInstance()->Set() you need to use to customize the PL profiling tool!!
Example:
// Add profiling information
Profiling::GetInstance()->Set("MyProfilingGroup", "Name: " + sName);
Profiling::GetInstance()->Set("MyProfilingGroup", String("Current level: ") + nLevel);
This will add the defined elements to the own profiling group ’MyProfilingGroup’. If this group doesn’t exist yet it’s created automatically, therefore you done have to be interested in the stuff behind all! If you want to do more that only the described above it’s still possible because you have FULL access to all required to remove groups etc. (because the profiling class is derived from ElementManager)
static PLCORE_API Profiling* PLCore::Profiling::GetInstance | ( | ) | [static] |
static PLCORE_API bool PLCore::Profiling::HasInstance | ( | ) | [static] |
bool PLCore::Profiling::IsActive | ( | ) | const [inline] |
Returns whether the profiling system is active or not.
void PLCore::Profiling::SetActive | ( | bool | bActive = false | ) | [inline] |
Sets whether the profiling system is active or not.
[in] | bActive | Should the profiling system be active? |
String PLCore::Profiling::GetSelectedGroup | ( | ) | const [inline] |
Returns the name of the current selected profile group.
PLCORE_API bool PLCore::Profiling::SelectGroup | ( | const String & | sName = "" | ) |
Selects a profile group.
[in] | sName | Name of the profile group which should be the current one If "" general profile information are shown. |
PLCORE_API String PLCore::Profiling::SelectNextGroup | ( | ) |
Selects the next profile group.
PLCORE_API String PLCore::Profiling::SelectPreviousGroup | ( | ) |
Selects the previous profile group.
PLCORE_API bool PLCore::Profiling::Set | ( | const String & | sGroup, |
const String & | sElement, | ||
const String & | sText | ||
) |
Sets the element text.
[in] | sGroup | Group name |
[in] | sElement | Element name |
[in] | sText | Text to be set |
PLCORE_API String PLCore::Profiling::GetText | ( | const String & | sGroup, |
const String & | sElement | ||
) | const |
Returns the element text.
[in] | sGroup | Group name |
[in] | sElement | Element name |
|