MeVisLabToolboxReference
|
#include <mlMetaProfile.h>
Public Types | |
enum | MLProfilingFunctionType { MLCall = 0, PythonCall = 1, FieldNotificationCall = 2, CppCall = 3, GLRenderCall = 4, PythonQtCall = 5, MLWEMCall = 6, MDLCommandCall = 7, MainFunctionCall = 8, CallTypeCount = 9 } |
Public Member Functions | |
const std::vector < MLMetaProfile * > & | getSubMetaProfiles () const |
Returns the sub meta profiles. | |
void | addSubMetaProfile (MLMetaProfile *subMetaProfile) |
Adds a sub meta profile. | |
MLCountProfile * | createCountProfile (const std::string &key) |
Creates a count profile. | |
MLCountProfile * | getCountProfile (const std::string &key) const |
Returns a count profile, or NULL if it does not exist. | |
bool | incrementCountValue (const std::string &key) |
Increments the count profile value by 1. | |
MLProfilingCountType | getCountValue (const std::string &key, bool *ok=NULL) const |
Returns the current value of a count profile. | |
const MLCountProfileMap & | getCountProfileMap () const |
Returns the map which contains count profiles by functions. | |
void | setCountProfileDescription (const std::string &key, const std::string &description) |
Sets the description of the count profile. | |
MLMemoryProfile * | createMemoryProfile (const std::string &key, MLCurrentlyUsedMemoryTracker *tracker) |
Creates a memory profile. | |
MLMemoryProfile * | getMemoryProfile (const std::string &key) const |
Returns a memory profile, or NULL if it does not exist. | |
bool | addMemory (const std::string &key, MLProfilingMemoryType memory) |
Adds allocated memory to a memory profile. | |
MLProfilingMemoryType | getMemory (const std::string &key, bool *ok=NULL) const |
Returns the overall used memory in bytes of a memory profile. | |
MLProfilingMemoryType | getAllMemory () const |
Returns the sum of the overall used memory of all memory profiles. | |
MLProfilingMemoryType | getCurrentlyUsedMemory (const std::string &key, bool *ok=NULL) const |
Returns the currently used memory in bytes of a memory profile. | |
MLProfilingMemoryType | getAllCurrentlyUsedMemory () const |
Returns the sum of the currently used memory of all memory profiles. | |
const MLMemoryProfileMap & | getMemoryProfileMap () const |
Returns the map which contains memory profiles by functions. | |
void | setMemoryProfileDescription (const std::string &key, const std::string &description) |
Sets the description of the memory profile. | |
MLTimeProfileHandle | startMeasuring (const std::string &function, int userId, void *userData=NULL, const std::string &filename="", int linenumber=-1) |
Starts measuring time. | |
void | stopMeasuring (MLTimeProfileHandle &handle) |
Stops measuring time and associates the elapsed time. | |
MLTimeProfile * | getTimeProfile () const |
Returns the time profile. | |
void | setDescription (const std::string &description_) |
Sets the meta profile's description. | |
const std::string & | description () const |
Returns the meta profile's description. | |
~MLMetaProfile () | |
Friends | |
class | MLMetaProfilePtr |
class | MLProfilingManager |
Definition at line 30 of file mlMetaProfile.h.
MLCall | |
PythonCall | |
FieldNotificationCall | |
CppCall | |
GLRenderCall | |
PythonQtCall | |
MLWEMCall | |
MDLCommandCall | |
MainFunctionCall | |
CallTypeCount |
Definition at line 33 of file mlMetaProfile.h.
MLMetaProfile::~MLMetaProfile | ( | ) |
bool MLMetaProfile::addMemory | ( | const std::string & | key, |
MLProfilingMemoryType | memory | ||
) |
Adds allocated memory to a memory profile.
key | The key that identifies the memory profile. |
memory | The amount of newly allocated memory. |
void MLMetaProfile::addSubMetaProfile | ( | MLMetaProfile * | subMetaProfile | ) | [inline] |
Adds a sub meta profile.
Definition at line 50 of file mlMetaProfile.h.
MLCountProfile* MLMetaProfile::createCountProfile | ( | const std::string & | key | ) |
Creates a count profile.
key | The key that identifies the count profile. |
MLMemoryProfile* MLMetaProfile::createMemoryProfile | ( | const std::string & | key, |
MLCurrentlyUsedMemoryTracker * | tracker | ||
) |
Creates a memory profile.
key | The key that identifies the memory profile. |
tracker | The MLCurrentlyUsedMemoryTracker must be set, which is required to read the currently used amount of memory. |
const std::string& MLMetaProfile::description | ( | ) | const [inline] |
Returns the meta profile's description.
Definition at line 170 of file mlMetaProfile.h.
MLProfilingMemoryType MLMetaProfile::getAllCurrentlyUsedMemory | ( | ) | const |
Returns the sum of the currently used memory of all memory profiles.
MLProfilingMemoryType MLMetaProfile::getAllMemory | ( | ) | const |
Returns the sum of the overall used memory of all memory profiles.
MLCountProfile* MLMetaProfile::getCountProfile | ( | const std::string & | key | ) | const |
Returns a count profile, or NULL if it does not exist.
key | The key that identifies the count profile. |
const MLCountProfileMap& MLMetaProfile::getCountProfileMap | ( | ) | const [inline] |
Returns the map which contains count profiles by functions.
Definition at line 79 of file mlMetaProfile.h.
MLProfilingCountType MLMetaProfile::getCountValue | ( | const std::string & | key, |
bool * | ok = NULL |
||
) | const |
Returns the current value of a count profile.
key | The key that identifies the count profile. |
ok | If ok is a valid pointer, then it will be set to false if no count profile with the given key exists. |
MLProfilingMemoryType MLMetaProfile::getCurrentlyUsedMemory | ( | const std::string & | key, |
bool * | ok = NULL |
||
) | const |
Returns the currently used memory in bytes of a memory profile.
key | The key that identifies the memory profile. |
ok | If ok is a valid pointer, then it will be set to false if no memory profile with the given key exists. |
MLProfilingMemoryType MLMetaProfile::getMemory | ( | const std::string & | key, |
bool * | ok = NULL |
||
) | const |
Returns the overall used memory in bytes of a memory profile.
key | The key that identifies the memory profile. |
ok | If ok is a valid pointer, then it will be set to false if no memory profile with the given key exists. |
MLMemoryProfile* MLMetaProfile::getMemoryProfile | ( | const std::string & | key | ) | const |
Returns a memory profile, or NULL if it does not exist.
key | The key that identifies the memory profile. |
const MLMemoryProfileMap& MLMetaProfile::getMemoryProfileMap | ( | ) | const [inline] |
Returns the map which contains memory profiles by functions.
Definition at line 133 of file mlMetaProfile.h.
const std::vector<MLMetaProfile*>& MLMetaProfile::getSubMetaProfiles | ( | ) | const [inline] |
Returns the sub meta profiles.
Definition at line 47 of file mlMetaProfile.h.
MLTimeProfile* MLMetaProfile::getTimeProfile | ( | ) | const [inline] |
Returns the time profile.
Definition at line 163 of file mlMetaProfile.h.
bool MLMetaProfile::incrementCountValue | ( | const std::string & | key | ) |
Increments the count profile value by 1.
key | The key that identifies the count profile. |
void MLMetaProfile::setCountProfileDescription | ( | const std::string & | key, |
const std::string & | description | ||
) |
Sets the description of the count profile.
key | The key that identifies the count profile. |
void MLMetaProfile::setDescription | ( | const std::string & | description_ | ) | [inline] |
Sets the meta profile's description.
Definition at line 168 of file mlMetaProfile.h.
void MLMetaProfile::setMemoryProfileDescription | ( | const std::string & | key, |
const std::string & | description | ||
) |
Sets the description of the memory profile.
key | The key that identifies the memory profile. |
MLTimeProfileHandle MLMetaProfile::startMeasuring | ( | const std::string & | function, |
int | userId, | ||
void * | userData = NULL , |
||
const std::string & | filename = "" , |
||
int | linenumber = -1 |
||
) | [inline] |
Starts measuring time.
function | The function identifies the measurement. |
userId | The user id can be any integer, it is just stored. |
userData | Optional data that is stored in the call graph nodes. |
Definition at line 149 of file mlMetaProfile.h.
void MLMetaProfile::stopMeasuring | ( | MLTimeProfileHandle & | handle | ) | [inline] |
Stops measuring time and associates the elapsed time.
handle | The MLTimeProfileHandle returned by startMeasuring() must be given. |
Definition at line 160 of file mlMetaProfile.h.
friend class MLMetaProfilePtr [friend] |
Definition at line 192 of file mlMetaProfile.h.
friend class MLProfilingManager [friend] |
Definition at line 193 of file mlMetaProfile.h.