OGRE
1.10.12
Object-Oriented Graphics Rendering Engine
|
The profiler allows you to measure the performance of your code. More...
#include <OgreProfiler.h>
Public Member Functions | |
Profiler () | |
~Profiler () | |
void | addListener (ProfileSessionListener *listener) |
void | beginGPUEvent (const String &event) |
Mark the beginning of a GPU event group. More... | |
void | beginProfile (const String &profileName, uint32 groupID=(uint32) OGREPROF_USER_DEFAULT) |
Begins a profile. More... | |
void | disableProfile (const String &profileName) |
Disables a profile. More... | |
void | enableProfile (const String &profileName) |
Enables a previously disabled profile. More... | |
void | endGPUEvent (const String &event) |
Mark the end of a GPU event group. More... | |
void | endProfile (const String &profileName, uint32 groupID=(uint32) OGREPROF_USER_DEFAULT) |
Ends a profile. More... | |
bool | getEnabled () const |
Gets whether this profiler is enabled. More... | |
uint32 | getProfileGroupMask () const |
Get the mask which all profiles must pass to be enabled. More... | |
Timer * | getTimer () |
Retrieves the timer for the profiler. More... | |
uint | getUpdateDisplayFrequency () const |
Gets the frequency that the Profiler display is updated. More... | |
void | logResults () |
Outputs current profile statistics to the log. More... | |
void | markGPUEvent (const String &event) |
Mark a specific, ungrouped, GPU event. More... | |
void | removeListener (ProfileSessionListener *listener) |
void | reset () |
Clears the profiler statistics. More... | |
void | setEnabled (bool enabled) |
Sets whether this profiler is enabled. More... | |
void | setProfileGroupMask (uint32 mask) |
Set the mask which all profiles must pass to be enabled. More... | |
void | setTimer (Timer *t) |
Sets the timer for the profiler. More... | |
void | setUpdateDisplayFrequency (uint freq) |
Sets the Profiler so the display of results are updated every n frames. More... | |
bool | watchForLimit (const String &profileName, Real limit, bool greaterThan=true) |
Returns true if the specified profile goes over or under the given limit frame time. More... | |
bool | watchForMax (const String &profileName) |
Returns true if the specified profile reaches a new frame time maximum. More... | |
bool | watchForMin (const String &profileName) |
Returns true if the specified profile reaches a new frame time minimum. More... | |
Static Public Member Functions | |
static Profiler & | getSingleton (void) |
Get the singleton instance. More... | |
static Profiler * | getSingletonPtr (void) |
Get the singleton instance. More... | |
Friends | |
class | ProfileInstance |
The profiler allows you to measure the performance of your code.
Ogre::Profiler::Profiler | ( | ) |
Ogre::Profiler::~Profiler | ( | ) |
void Ogre::Profiler::setTimer | ( | Timer * | t | ) |
Sets the timer for the profiler.
Timer* Ogre::Profiler::getTimer | ( | ) |
Retrieves the timer for the profiler.
void Ogre::Profiler::beginProfile | ( | const String & | profileName, |
uint32 | groupID = (uint32) OGREPROF_USER_DEFAULT |
||
) |
Begins a profile.
profileName | Must be unique and must not be an empty string |
groupID | A profile group identifier, which can allow you to mask profiles |
void Ogre::Profiler::endProfile | ( | const String & | profileName, |
uint32 | groupID = (uint32) OGREPROF_USER_DEFAULT |
||
) |
Ends a profile.
profileName | Must be unique and must not be an empty string |
groupID | A profile group identifier, which can allow you to mask profiles |
void Ogre::Profiler::beginGPUEvent | ( | const String & | event | ) |
Mark the beginning of a GPU event group.
void Ogre::Profiler::endGPUEvent | ( | const String & | event | ) |
Mark the end of a GPU event group.
void Ogre::Profiler::markGPUEvent | ( | const String & | event | ) |
Mark a specific, ungrouped, GPU event.
void Ogre::Profiler::setEnabled | ( | bool | enabled | ) |
Sets whether this profiler is enabled.
Only takes effect after the the frame has ended.
bool Ogre::Profiler::getEnabled | ( | ) | const |
Gets whether this profiler is enabled.
void Ogre::Profiler::enableProfile | ( | const String & | profileName | ) |
Enables a previously disabled profile.
void Ogre::Profiler::disableProfile | ( | const String & | profileName | ) |
Disables a profile.
|
inline |
Set the mask which all profiles must pass to be enabled.
|
inline |
Get the mask which all profiles must pass to be enabled.
bool Ogre::Profiler::watchForMax | ( | const String & | profileName | ) |
Returns true if the specified profile reaches a new frame time maximum.
bool Ogre::Profiler::watchForMin | ( | const String & | profileName | ) |
Returns true if the specified profile reaches a new frame time minimum.
bool Ogre::Profiler::watchForLimit | ( | const String & | profileName, |
Real | limit, | ||
bool | greaterThan = true |
||
) |
Returns true if the specified profile goes over or under the given limit frame time.
limit | A number between 0 and 1 representing the percentage of frame time |
greaterThan | If true, this will return whether the limit is exceeded. Otherwise, it will return if the frame time has gone under this limit. |
void Ogre::Profiler::logResults | ( | ) |
Outputs current profile statistics to the log.
void Ogre::Profiler::reset | ( | ) |
Clears the profiler statistics.
void Ogre::Profiler::setUpdateDisplayFrequency | ( | uint | freq | ) |
Sets the Profiler so the display of results are updated every n frames.
uint Ogre::Profiler::getUpdateDisplayFrequency | ( | ) | const |
Gets the frequency that the Profiler display is updated.
void Ogre::Profiler::addListener | ( | ProfileSessionListener * | listener | ) |
listener | A valid listener derived class |
void Ogre::Profiler::removeListener | ( | ProfileSessionListener * | listener | ) |
listener | A valid listener derived class |
|
static |
Get the singleton instance.
|
static |
Get the singleton instance.
|
friend |