|
MeVisLab Toolbox Reference
|
#include <mlTimeProfile.h>
Public Member Functions | |
| MLTimeProfile (const MLMetaProfile *metaProfile=nullptr) | |
| ~MLTimeProfile () | |
| MLTimeProfileHandle | startMeasuring (const std::string &function, int userId, void *userData, const std::string &filename, int linenumber, const std::string &nodeInfo="") |
| Starts measuring time. | |
| void | stopMeasuring (MLTimeProfileHandle &handle, bool ignoreIfEmpty=false) |
| Stops measuring time and associates the elapsed time. | |
| void | addTimeToFunction (const std::string &function, int userId, const std::string &filename, int linenumber, MLProfilingTimeType time, int callCount) |
| Adds time to the given function, without measuring and without putting the function onto the call stack. | |
| void | reset () |
| Resets the time profile. | |
| void | makeSnapshot () |
| const MLMetaProfile * | metaProfile () const |
| Returns the metaprofile. Do not assume that the pointer is valid! | |
| MLProfilingTimeType | allElapsedTime () const |
| Returns the sum of the elapsed time of all functions in seconds. | |
| MLProfilingTimeType | allConsumedTime () const |
| Returns the sum of the consumed time of all functions in seconds. | |
| MLProfilingTimeType | allElapsedTimeSnapshot () const |
| Returns snapshot of the sum of the elapsed time of all functions in seconds. | |
| MLProfilingTimeType | allConsumedTimeSnapshot () const |
| Returns snapshot of the sum of the consumed time of all functions in seconds. | |
| const MLCallGraphFunctionSet & | usedFunctions () const |
| Returns the function map. | |
| MLCallGraphFunctionPtr | getFunctionForTesting (const std::string &function) const |
| Returns the function pointer or NULL. | |
Static Public Member Functions | |
| static MLCallGraphNode & | callGraph () |
| Returns the timer tree root. | |
| static MLCallGraphNode * | callGraphCopy () |
| Returns the timer copy tree root. | |
| static void | refreshCallGraphCopy () |
| Resets the timer copy tree root. | |
| static const MLCallGraphGlobalFunctionMap & | globalFunctionMap () |
| Returns the global function map. | |
| static const MLCallGraphFunctionList & | globalFunctionList () |
| Returns the global function list. | |
| static const MLCallGraphFunctionList & | globalFunctionListCopy () |
| Returns copy of the global function list. | |
| static MLCallGraphFunctionPtr | getFunctionGlobal (const std::string &function, const std::string &filename, int linenumber) |
| Returns the function pointer or NULL. | |
| static MLProfilingTimeType | globalElapsedTime () |
| Returns the global elapsed time in seconds. | |
| static void | setReduceCallGraph (bool reduceCallGraph) |
| Sets whether the call graph should be reduced. | |
| static void | setAllowParameterEvaluation (bool allowParameterEvaluation) |
| Sets whether function parameters should be evaluated. | |
| static bool | shouldReduceCallGraph () |
| Returns whether the call graph should be reduced. | |
| static bool | shouldAllowParameterEvaluation () |
| Returns whether the call graph should be reduced. | |
| static void | initialize () |
| Static initialization, is called by the profiling manager. | |
| static void | deinitialize () |
| Static deinitialization, is called by the profiling manager. | |
| static void | enableTracing (const char *filename) |
| Enables call tracing and set the trace filname. | |
| static void | disableTracing () |
| Disables call tracing. | |
| static bool | isTracingEnabled () |
| Returns whether call tracing is enabled. | |
| static void | resetGlobalFunctionListCopy () |
Static Public Attributes | |
| static MLCallGraphFunctionPtr | mainFunction |
Friends | |
| class | MLAccumulatedProfile |
| class | MLCallGraphNode |
| class | MLProfilingManager |
| class | MLABModuleProfile |
Definition at line 54 of file mlTimeProfile.h.
| MLTimeProfile::MLTimeProfile | ( | const MLMetaProfile * | metaProfile = nullptr | ) |
| MLTimeProfile::~MLTimeProfile | ( | ) |
| void MLTimeProfile::addTimeToFunction | ( | const std::string & | function, |
| int | userId, | ||
| const std::string & | filename, | ||
| int | linenumber, | ||
| MLProfilingTimeType | time, | ||
| int | callCount ) |
Adds time to the given function, without measuring and without putting the function onto the call stack.
This can be used to integrate times from other threads.
|
inline |
Returns the sum of the consumed time of all functions in seconds.
Definition at line 91 of file mlTimeProfile.h.
|
inline |
Returns snapshot of the sum of the consumed time of all functions in seconds.
Definition at line 103 of file mlTimeProfile.h.
|
inline |
Returns the sum of the elapsed time of all functions in seconds.
Definition at line 85 of file mlTimeProfile.h.
|
inline |
Returns snapshot of the sum of the elapsed time of all functions in seconds.
Definition at line 97 of file mlTimeProfile.h.
|
static |
Returns the timer tree root.
|
static |
Returns the timer copy tree root.
Static deinitialization, is called by the profiling manager.
Enables call tracing and set the trace filname.
| MLCallGraphFunctionPtr MLTimeProfile::getFunctionForTesting | ( | const std::string & | function | ) | const |
Returns the function pointer or NULL.
|
static |
Returns the function pointer or NULL.
|
static |
Returns the global elapsed time in seconds.
|
inlinestatic |
Returns the global function list.
Definition at line 130 of file mlTimeProfile.h.
|
inlinestatic |
Returns copy of the global function list.
Definition at line 136 of file mlTimeProfile.h.
|
inlinestatic |
Returns the global function map.
Definition at line 124 of file mlTimeProfile.h.
Static initialization, is called by the profiling manager.
Returns whether call tracing is enabled.
Definition at line 189 of file mlTimeProfile.h.
| void MLTimeProfile::makeSnapshot | ( | ) |
| const MLMetaProfile * MLTimeProfile::metaProfile | ( | ) | const |
Returns the metaprofile. Do not assume that the pointer is valid!
| void MLTimeProfile::reset | ( | ) |
Resets the time profile.
|
inlinestatic |
Sets whether function parameters should be evaluated.
Definition at line 159 of file mlTimeProfile.h.
References mlrange_cast().
Sets whether the call graph should be reduced.
Definition at line 153 of file mlTimeProfile.h.
References mlrange_cast().
Returns whether the call graph should be reduced.
Definition at line 171 of file mlTimeProfile.h.
Returns whether the call graph should be reduced.
Definition at line 165 of file mlTimeProfile.h.
| MLTimeProfileHandle MLTimeProfile::startMeasuring | ( | const std::string & | function, |
| int | userId, | ||
| void * | userData, | ||
| const std::string & | filename, | ||
| int | linenumber, | ||
| const std::string & | nodeInfo = "" ) |
Starts measuring time.
| id | The ID identifies the function. |
| void MLTimeProfile::stopMeasuring | ( | MLTimeProfileHandle & | handle, |
| bool | ignoreIfEmpty = false ) |
Stops measuring time and associates the elapsed time.
| handle | The MLTimeProfileHandle returned by startMeasuring() must be given. |
|
inline |
Returns the function map.
Definition at line 118 of file mlTimeProfile.h.
Definition at line 260 of file mlTimeProfile.h.
|
friend |
Definition at line 256 of file mlTimeProfile.h.
|
friend |
Definition at line 257 of file mlTimeProfile.h.
|
friend |
Definition at line 258 of file mlTimeProfile.h.
|
static |
Definition at line 226 of file mlTimeProfile.h.