OGRE 2.1
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. | |
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. | |
void | disableProfile (const String &profileName) |
Disables a profile. | |
void | enableProfile (const String &profileName) |
Enables a previously disabled profile. | |
void | endGPUEvent (const String &event) |
Mark the end of a GPU event group. | |
void | endGPUSample (const String &name) |
void | endProfile (const String &profileName, uint32 groupID=(uint32) OGREPROF_USER_DEFAULT) |
Ends a profile. | |
bool | getEnabled () const |
Gets whether this profiler is enabled. | |
OfflineProfiler & | getOfflineProfiler (void) |
uint32 | getProfileGroupMask () const |
Get the mask which all profiles must pass to be enabled. | |
Timer * | getTimer () |
Retrieves the timer for the profiler. | |
uint | getUpdateDisplayFrequency () const |
Gets the frequency that the Profiler display is updated. | |
bool | getUseStableMarkers (void) const |
void | logResults () |
Outputs current profile statistics to the log. | |
void | markGPUEvent (const String &event) |
Mark a specific, ungrouped, GPU event. | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
void | removeListener (ProfileSessionListener *listener) |
void | reset (bool deleteAll) |
Clears the profiler statistics. | |
void | setEnabled (bool enabled) |
Sets whether this profiler is enabled. | |
void | setProfileGroupMask (uint32 mask) |
Set the mask which all profiles must pass to be enabled. | |
void | setTimer (Timer *t) |
Sets the timer for the profiler. | |
void | setUpdateDisplayFrequency (uint freq) |
Sets the Profiler so the display of results are updated every n frames. | |
void | setUseStableMarkers (bool useStableMarkers) |
Sets whether each frame should be tagged with the frame number (starting from 0). | |
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. | |
bool | watchForMax (const String &profileName) |
Returns true if the specified profile reaches a new frame time maximum. | |
bool | watchForMin (const String &profileName) |
Returns true if the specified profile reaches a new frame time minimum. | |
Static Public Member Functions | |
static Profiler & | getSingleton (void) |
Override standard Singleton retrieval. | |
static Profiler * | getSingletonPtr (void) |
Override standard Singleton retrieval. | |
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 |
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 |
Disables a profile.
Enables a previously disabled profile.
Mark the end of a GPU event group.
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 |
|
inline |
Get the mask which all profiles must pass to be enabled.
Override standard Singleton retrieval.
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.
void Ogre::Profiler::logResults | ( | ) |
Outputs current profile statistics to the log.
Mark a specific, ungrouped, GPU event.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
placement operator new
|
inlineinherited |
|
inlineinherited |
array operator new, with debug line info
void Ogre::Profiler::removeListener | ( | ProfileSessionListener * | listener | ) |
listener | A valid listener derived class |
Sets whether this profiler is enabled.
Only takes effect after the the frame has ended.
Set the mask which all profiles must pass to be enabled.
Sets the Profiler so the display of results are updated every n frames.
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. |
Returns true if the specified profile reaches a new frame time maximum.
Returns true if the specified profile reaches a new frame time minimum.
|
friend |