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 | beginProfile (const String &profileName, uint32 groupID=(uint32) OGREPROF_USER_DEFAULT) |
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 | endProfile (const String &profileName, uint32 groupID=(uint32) OGREPROF_USER_DEFAULT) |
Ends a profile. | |
bool | getEnabled () const |
Gets whether this profiler is enabled. | |
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. | |
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 () |
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. | |
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. | |
Protected Types | |
typedef set< String >::type | DisabledProfileMap |
typedef ProfileInstance::ProfileChildren | ProfileChildren |
typedef vector< ProfileSessionListener * >::type | TProfileSessionListener |
Protected Member Functions | |
void | changeEnableState () |
Handles a change of the profiler's enabled state. | |
void | displayResults () |
void | initialize () |
Initializes the profiler's GUI elements. | |
void | processFrameStats (ProfileInstance *instance, Real &maxFrameTime) |
Processes specific ProfileInstance and it's children recursively. | |
void | processFrameStats (void) |
Processes frame stats for all of the mRoot's children. | |
Protected Attributes | |
Real | mAverageFrameTime |
Rolling average of millisecs. | |
ProfileInstance * | mCurrent |
uint | mCurrentFrame |
The number of elapsed frame, used with mUpdateDisplayFrequency. | |
DisabledProfileMap | mDisabledProfiles |
Holds the names of disabled profiles. | |
bool | mEnabled |
Whether this profiler is enabled. | |
bool | mInitialized |
Whether the GUI elements have been initialized. | |
ProfileInstance * | mLast |
TProfileSessionListener | mListeners |
ulong | mMaxTotalFrameTime |
The max frame time recorded. | |
bool | mNewEnableState |
Keeps track of the new enabled/disabled state that the user has requested which will be applied after the frame ends. | |
uint32 | mProfileMask |
Mask to decide whether a type of profile is enabled or not. | |
bool | mResetExtents |
ProfileInstance | mRoot |
Timer * | mTimer |
The timer used for profiling. | |
ulong | mTotalFrameTime |
The total time each frame takes. | |
uint | mUpdateDisplayFrequency |
The number of frames that must elapse before the current frame display is updated. | |
Static Protected Attributes | |
static Profiler * | msSingleton |
Friends | |
class | ProfileInstance |
The profiler allows you to measure the performance of your code.
Definition at line 280 of file OgreProfiler.h.
|
protected |
Definition at line 473 of file OgreProfiler.h.
Definition at line 474 of file OgreProfiler.h.
|
protected |
Definition at line 456 of file OgreProfiler.h.
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 |
||
) |
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 |
|
protected |
Handles a change of the profiler's enabled state.
Disables a profile.
|
protected |
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.
uint32 Ogre::Profiler::getProfileGroupMask | ( | ) | const |
Get the mask which all profiles must pass to be enabled.
Definition at line 365 of file OgreProfiler.h.
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.
|
protected |
Initializes the profiler's GUI elements.
void Ogre::Profiler::logResults | ( | ) |
Outputs current profile statistics to the log.
Mark a specific, ungrouped, GPU event.
Definition at line 96 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
Definition at line 102 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
|
inherited |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
Definition at line 73 of file OgreMemoryAllocatedObject.h.
|
inherited |
operator new, with debug line info
Definition at line 68 of file OgreMemoryAllocatedObject.h.
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
Definition at line 91 of file OgreMemoryAllocatedObject.h.
|
inherited |
array operator new, with debug line info
Definition at line 86 of file OgreMemoryAllocatedObject.h.
|
protected |
Processes specific ProfileInstance and it's children recursively.
Processes frame stats for all of the mRoot's children.
void Ogre::Profiler::removeListener | ( | ProfileSessionListener * | listener | ) |
listener | A valid listener derived class |
void Ogre::Profiler::reset | ( | ) |
Clears the profiler statistics.
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.
Definition at line 362 of file OgreProfiler.h.
Sets the Profiler so the display of results are updated every n frames.
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 |
Definition at line 454 of file OgreProfiler.h.
|
protected |
Rolling average of millisecs.
Definition at line 513 of file OgreProfiler.h.
|
protected |
Definition at line 476 of file OgreProfiler.h.
|
protected |
The number of elapsed frame, used with mUpdateDisplayFrequency.
Definition at line 491 of file OgreProfiler.h.
|
protected |
Holds the names of disabled profiles.
Definition at line 481 of file OgreProfiler.h.
|
protected |
Whether this profiler is enabled.
Definition at line 500 of file OgreProfiler.h.
|
protected |
Whether the GUI elements have been initialized.
Definition at line 484 of file OgreProfiler.h.
|
protected |
Definition at line 477 of file OgreProfiler.h.
|
protected |
Definition at line 457 of file OgreProfiler.h.
|
protected |
The max frame time recorded.
Definition at line 510 of file OgreProfiler.h.
|
protected |
Keeps track of the new enabled/disabled state that the user has requested which will be applied after the frame ends.
Definition at line 504 of file OgreProfiler.h.
|
protected |
Mask to decide whether a type of profile is enabled or not.
Definition at line 507 of file OgreProfiler.h.
|
protected |
Definition at line 514 of file OgreProfiler.h.
|
protected |
Definition at line 478 of file OgreProfiler.h.
|
staticprotectedinherited |
Definition at line 75 of file OgreSingleton.h.
|
protected |
The timer used for profiling.
Definition at line 494 of file OgreProfiler.h.
|
protected |
The total time each frame takes.
Definition at line 497 of file OgreProfiler.h.
|
protected |
The number of frames that must elapse before the current frame display is updated.
Definition at line 488 of file OgreProfiler.h.
Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.