|
The armarx::Profiler::Profiler class can be used for timing executions within the ArmarX framework. More...
#include <ArmarXCore/core/services/profiler/Profiler.h>
Public Types | |
enum | EventType { eFunctionStart = 0, eFunctionReturn, eFunctionBreak, eNumberEventTypes } |
The EventType enum provides symbolic names for the different events which can be logged via armarx::Profiler::Profiler::logEvent() More... | |
using | EventTypeMap = std::map< Profiler::EventType, std::string > |
Public Member Functions | |
void | logEvent (Profiler::EventType eventType, const std::string &parentName, const std::string &functionName) |
void | logProcessCpuUsage (float cpuUsage) |
void | logProcessMemoryUsage (int memoryUsage) |
void | logStatechartInputParameters (const std::string &stateIdentifier, const armarx::StateParameterMap &inputParameterMap) |
void | logStatechartLocalParameters (const std::string &stateIdentifier, const armarx::StateParameterMap &localParameterMap) |
void | logStatechartOutputParameters (const std::string &stateIdentifier, const armarx::StateParameterMap &outputParameterMap) |
void | logStatechartTransition (const std::string &parentStateIdentifier, const StateIceBasePtr &sourceState, const StateIceBasePtr &destinationState, const std::string &eventName) |
void | logStatechartTransitionWithParameters (const TransitionIceBase &transition) |
Profiler () | |
void | reset () |
reset reinitializes armarx::Profiler::Profiler::startTime with the current time. More... | |
void | setLoggingStrategy (LoggingStrategyPtr loggingStrategy) |
void | setName (const std::string &profilerName) |
~Profiler () | |
Static Public Member Functions | |
static std::string | GetEventName (Profiler::EventType eventType) |
getEventName maps enum values from armarx::Profiler::Profiler::EventType to strings More... | |
Protected Attributes | |
std::string | profilerName |
The armarx::Profiler::Profiler class can be used for timing executions within the ArmarX framework.
The armarx::Profiler::Profiler class provides methods for logging events and statechart transitions. Changing the logging behavior requires calling armarx::Profiler::Profiler::setLoggingStrategy() with a specialized implementation of armarx::Profiler::LoggingStrategy. By default, all calls to log functions are ignored.
Definition at line 88 of file Profiler.h.
using EventTypeMap = std::map<Profiler::EventType, std::string> |
Definition at line 102 of file Profiler.h.
enum EventType |
The EventType enum provides symbolic names for the different events which can be logged via armarx::Profiler::Profiler::logEvent()
Enumerator | |
---|---|
eFunctionStart | |
eFunctionReturn | |
eFunctionBreak | |
eNumberEventTypes |
Definition at line 94 of file Profiler.h.
Profiler | ( | ) |
Definition at line 38 of file Profiler.cpp.
~Profiler | ( | ) |
Definition at line 45 of file Profiler.cpp.
|
static |
getEventName maps enum values from armarx::Profiler::Profiler::EventType to strings
eventType |
Definition at line 31 of file Profiler.cpp.
void logEvent | ( | Profiler::EventType | eventType, |
const std::string & | parentName, | ||
const std::string & | functionName | ||
) |
Definition at line 70 of file Profiler.cpp.
void logProcessCpuUsage | ( | float | cpuUsage | ) |
Definition at line 111 of file Profiler.cpp.
void logProcessMemoryUsage | ( | int | memoryUsage | ) |
Definition at line 117 of file Profiler.cpp.
void logStatechartInputParameters | ( | const std::string & | stateIdentifier, |
const armarx::StateParameterMap & | inputParameterMap | ||
) |
Definition at line 93 of file Profiler.cpp.
void logStatechartLocalParameters | ( | const std::string & | stateIdentifier, |
const armarx::StateParameterMap & | localParameterMap | ||
) |
Definition at line 99 of file Profiler.cpp.
void logStatechartOutputParameters | ( | const std::string & | stateIdentifier, |
const armarx::StateParameterMap & | outputParameterMap | ||
) |
Definition at line 105 of file Profiler.cpp.
void logStatechartTransition | ( | const std::string & | parentStateIdentifier, |
const StateIceBasePtr & | sourceState, | ||
const StateIceBasePtr & | destinationState, | ||
const std::string & | eventName | ||
) |
Definition at line 77 of file Profiler.cpp.
void logStatechartTransitionWithParameters | ( | const TransitionIceBase & | transition | ) |
Definition at line 135 of file Profiler.cpp.
|
inline |
reset reinitializes armarx::Profiler::Profiler::startTime with the current time.
void setLoggingStrategy | ( | LoggingStrategyPtr | loggingStrategy | ) |
Definition at line 57 of file Profiler.cpp.
void setName | ( | const std::string & | profilerName | ) |
Definition at line 50 of file Profiler.cpp.
|
protected |
Definition at line 133 of file Profiler.h.