OGRE
2.2.4
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 | beginGPUSample (const String &name, uint32 *hashCache) |
void | beginProfile (const String &profileName, uint32 groupID=(uint32) OGREPROF_USER_DEFAULT, ProfileSampleFlags::ProfileSampleFlags flags=ProfileSampleFlags::FlagsNone) |
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 | endGPUSample (const String &name) |
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... | |
bool | getUseStableMarkers (void) const |
void | logResults () |
Outputs current profile statistics to the log. More... | |
void | markGPUEvent (const String &event) |
Mark a specific, ungrouped, GPU event. More... | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void * | operator new[] (size_t sz) |
void | removeListener (ProfileSessionListener *listener) |
void | reset (bool deleteAll) |
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... | |
void | setUseStableMarkers (bool useStableMarkers) |
Sets whether each frame should be tagged with the frame number (starting from 0). 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) |
Override standard Singleton retrieval. More... | |
static Profiler * | getSingletonPtr (void) |
Override standard Singleton retrieval. More... | |
Friends | |
class | ProfileInstance |
The profiler allows you to measure the performance of your code.
Ogre::Profiler::Profiler | ( | ) |
Ogre::Profiler::~Profiler | ( | ) |
void Ogre::Profiler::addListener | ( | ProfileSessionListener * | listener | ) |
listener | A valid listener derived class |
void Ogre::Profiler::beginGPUEvent | ( | const String & | event | ) |
Mark the beginning of a GPU event group.
void Ogre::Profiler::beginProfile | ( | const String & | profileName, |
uint32 | groupID = (uint32) OGREPROF_USER_DEFAULT , |
||
ProfileSampleFlags::ProfileSampleFlags | flags = ProfileSampleFlags::FlagsNone |
||
) |
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::disableProfile | ( | const String & | profileName | ) |
Disables a profile.
void Ogre::Profiler::enableProfile | ( | const String & | profileName | ) |
Enables a previously disabled profile.
void Ogre::Profiler::endGPUEvent | ( | const String & | event | ) |
Mark the end of a GPU event group.
void Ogre::Profiler::endGPUSample | ( | const String & | name | ) |
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 |
bool Ogre::Profiler::getEnabled | ( | ) | const |
Gets whether this profiler is enabled.
|
inline |
Get the mask which all profiles must pass to be enabled.
|
static |
Override standard Singleton retrieval.
|
static |
Override standard Singleton retrieval.
Timer* Ogre::Profiler::getTimer | ( | ) |
Retrieves the timer for the profiler.
uint Ogre::Profiler::getUpdateDisplayFrequency | ( | ) | const |
Gets the frequency that the Profiler display is updated.
bool Ogre::Profiler::getUseStableMarkers | ( | void | ) | const |
void Ogre::Profiler::logResults | ( | ) |
Outputs current profile statistics to the log.
void Ogre::Profiler::markGPUEvent | ( | const String & | event | ) |
Mark a specific, ungrouped, GPU event.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
|
inlineinherited |
|
inlineinherited |
placement operator new
|
inlineinherited |
array operator new, with debug line info
|
inlineinherited |
void Ogre::Profiler::removeListener | ( | ProfileSessionListener * | listener | ) |
listener | A valid listener derived class |
void Ogre::Profiler::reset | ( | bool | deleteAll | ) |
Clears the profiler statistics.
void Ogre::Profiler::setEnabled | ( | bool | enabled | ) |
Sets whether this profiler is enabled.
Only takes effect after the the frame has ended.
|
inline |
Set the mask which all profiles must pass to be enabled.
void Ogre::Profiler::setTimer | ( | Timer * | t | ) |
Sets the timer for the profiler.
void Ogre::Profiler::setUpdateDisplayFrequency | ( | uint | freq | ) |
Sets the Profiler so the display of results are updated every n frames.
void Ogre::Profiler::setUseStableMarkers | ( | bool | useStableMarkers | ) |
Sets whether each frame should be tagged with the frame number (starting from 0).
This is very useful for tagging and identifying CPU samples with GPU ones, but it causes Remotery to shift colours like a rainbow. Setting this to true forces each frame to not have the frame number embedded in it, which stabilizes the colour. Default is false.
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. |
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.
|
friend |