34 return Profiler::GetEventTypeMap().at(eventType);
52 this->profilerName = profilerName;
53 std::unique_lock lock(loggerMutex);
54 logger->setId(profilerName);
64 std::unique_lock lock(loggerMutex);
65 logger = loggingStrategy;
66 logger->setId(profilerName);
72 std::unique_lock lock(loggerMutex);
73 logger->logEvent(::getpid(), IceUtil::Time::now().toMicroSeconds(), profilerName, timestampUnit, Profiler::GetEventName(eventType), parentName, functionName);
80 ProfilerStatechartTransition transition;
81 transition.processId =
static_cast<Ice::Long>(::getpid());
82 transition.timestamp = IceUtil::Time::now().toMicroSeconds();
83 transition.parentStateIdentifier = parentStateIdentifier;
84 transition.sourceStateIdentifier = sourceState ? sourceState->globalStateIdentifier :
"";
85 transition.targetStateIdentifier = destinationState->globalStateIdentifier;
86 transition.targetStateType = destinationState->stateType;
87 transition.eventName = eventName;
89 std::unique_lock lock(loggerMutex);
90 logger->logStatechartTransition(transition);
95 std::unique_lock lock(loggerMutex);
96 logger->logStatechartInputParameters(::getpid(), IceUtil::Time::now().toMicroSeconds(), stateIdentifier, inputParameterMap);
101 std::unique_lock lock(loggerMutex);
102 logger->logStatechartLocalParameters(::getpid(), IceUtil::Time::now().toMicroSeconds(), stateIdentifier, localParameterMap);
107 std::unique_lock lock(loggerMutex);
108 logger->logStatechartOutputParameters(::getpid(), IceUtil::Time::now().toMicroSeconds(), stateIdentifier, outputParameterMap);
113 std::unique_lock lock(loggerMutex);
114 logger->logProcessCpuUsage(::getpid(), IceUtil::Time::now().toMicroSeconds(), cpuUsage);
119 std::unique_lock lock(loggerMutex);
120 logger->logProcessMemoryUsage(::getpid(), IceUtil::Time::now().toMicroSeconds(), memoryUsage);
126 const static EventTypeMap evenTypeNameMap
128 {Profiler::eFunctionStart,
"FUNCTION_START"},
129 {Profiler::eFunctionReturn,
"FUNCTION_RETURN"},
130 {Profiler::eFunctionBreak,
"FUNCTION_RETURN"},
132 return evenTypeNameMap;
137 std::unique_lock lock(loggerMutex);
138 logger->logStatechartTransitionWithParameters(::getpid(), IceUtil::Time::now().toMicroSeconds(), transition);