MeVisLabToolboxReference
MLTimeProfile Class Reference

#include <mlTimeProfile.h>

List of all members.

Public Member Functions

 MLTimeProfile (const MLMetaProfile *metaProfile=NULL)
 ~MLTimeProfile ()
MLTimeProfileHandle startMeasuring (const std::string &function, int userId, void *userData, const std::string &filename, int linenumber)
 Starts measuring time.
void stopMeasuring (MLTimeProfileHandle &handle)
 Stops measuring time and associates the elapsed time.
void reset ()
 Resets the time profile.
const MLMetaProfilemetaProfile () const
 Returns the meta profile. Don't 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.
const MLCallGraphFunctionMapfunctionMap () const
 Returns the function map.
MLCallGraphFunctionId getFunctionId (const std::string &identifier) const
 Returns the id of the function, or 0 if none exist.
MLCallGraphFunctionPtr getFunction (MLCallGraphFunctionId functionId) const
 Returns the function pointer or NULL.

Static Public Member Functions

static MLCallGraphNodecallGraph ()
 Returns the timer tree root.
static const
MLCallGraphFunctionMap
globalFunctionMap ()
 Returns the global function map.
static const
MLCallGraphFunctionList
globalFunctionList ()
 Returns the global function list.
static MLCallGraphFunctionPtr getFunctionGlobal (const std::string &identifier)
 Returns the function pointer or NULL.
static MLProfilingTimeType globalElapsedTime ()
 Returns the global elapsed time in seconds.
static void setReduceCallGraph (bool reduceCallGraph)
 Sets if 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 Public Attributes

static MLCallGraphFunctionPtr mainFunction

Friends

class MLAccumulatedProfile
class MLCallGraphNode
class MLProfilingManager
class MLABModuleProfile

Detailed Description

Definition at line 58 of file mlTimeProfile.h.


Constructor & Destructor Documentation

MLTimeProfile::MLTimeProfile ( const MLMetaProfile metaProfile = NULL)
MLTimeProfile::~MLTimeProfile ( )

Member Function Documentation

MLProfilingTimeType MLTimeProfile::allConsumedTime ( ) const [inline]

Returns the sum of the consumed time of all functions in seconds.

Definition at line 87 of file mlTimeProfile.h.

MLProfilingTimeType MLTimeProfile::allElapsedTime ( ) const [inline]

Returns the sum of the elapsed time of all functions in seconds.

Definition at line 84 of file mlTimeProfile.h.

static MLCallGraphNode& MLTimeProfile::callGraph ( ) [static]

Returns the timer tree root.

static void MLTimeProfile::deinitialize ( ) [static]

Static deinitialization, is called by the profiling manager.

const MLCallGraphFunctionMap& MLTimeProfile::functionMap ( ) const [inline]

Returns the function map.

Definition at line 93 of file mlTimeProfile.h.

MLCallGraphFunctionPtr MLTimeProfile::getFunction ( MLCallGraphFunctionId  functionId) const

Returns the function pointer or NULL.

static MLCallGraphFunctionPtr MLTimeProfile::getFunctionGlobal ( const std::string &  identifier) [static]

Returns the function pointer or NULL.

MLCallGraphFunctionId MLTimeProfile::getFunctionId ( const std::string &  identifier) const

Returns the id of the function, or 0 if none exist.

static MLProfilingTimeType MLTimeProfile::globalElapsedTime ( ) [static]

Returns the global elapsed time in seconds.

static const MLCallGraphFunctionList& MLTimeProfile::globalFunctionList ( ) [inline, static]

Returns the global function list.

Definition at line 99 of file mlTimeProfile.h.

static const MLCallGraphFunctionMap& MLTimeProfile::globalFunctionMap ( ) [inline, static]

Returns the global function map.

Definition at line 96 of file mlTimeProfile.h.

static void MLTimeProfile::initialize ( ) [static]

Static initialization, is called by the profiling manager.

const MLMetaProfile* MLTimeProfile::metaProfile ( ) const

Returns the meta profile. Don't assume that the pointer is valid!

void MLTimeProfile::reset ( )

Resets the time profile.

static void MLTimeProfile::setReduceCallGraph ( bool  reduceCallGraph) [inline, static]

Sets if the call graph should be reduced.

Definition at line 114 of file mlTimeProfile.h.

MLTimeProfileHandle MLTimeProfile::startMeasuring ( const std::string &  function,
int  userId,
void *  userData,
const std::string &  filename,
int  linenumber 
)

Starts measuring time.

Parameters:
idThe id identifies the function.
Returns:
Returns the MLTimeProfileHandle, which is required to stop the measurement.
void MLTimeProfile::stopMeasuring ( MLTimeProfileHandle handle)

Stops measuring time and associates the elapsed time.

Parameters:
handleThe MLTimeProfileHandle returned by startMeasuring() must be given.

Friends And Related Function Documentation

friend class MLABModuleProfile [friend]

Definition at line 176 of file mlTimeProfile.h.

friend class MLAccumulatedProfile [friend]

Definition at line 172 of file mlTimeProfile.h.

friend class MLCallGraphNode [friend]

Definition at line 173 of file mlTimeProfile.h.

friend class MLProfilingManager [friend]

Definition at line 174 of file mlTimeProfile.h.


Member Data Documentation


The documentation for this class was generated from the following file: