28 #include "../../libraries/memorytypes/entity/profiler/ProfilerMemorySnapshot.h"
29 #include "../../libraries/memorytypes/entity/profiler/ProfilerTransition.h"
31 #include <MemoryX/interface/components/ProfilerStorageInterface.h>
32 #include <MemoryX/interface/components/CommonStorageInterface.h>
33 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
34 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
57 virtual public ProfilerStorageInterface
104 void reportEvent(
const armarx::ProfilerEvent& profilerEvent,
const Ice::Current& context = Ice::emptyCurrent)
override;
106 void reportStatechartTransition(
const armarx::ProfilerStatechartTransition& transition, const ::Ice::Current& context = Ice::emptyCurrent)
override;
111 void reportProcessCpuUsage(
const armarx::ProfilerProcessCpuUsage& process,
const Ice::Current& context = Ice::emptyCurrent)
override;
112 void reportProcessMemoryUsage(
const armarx::ProfilerProcessMemoryUsage& memoryUsage,
const Ice::Current& context = Ice::emptyCurrent)
override;
115 void reportEventList(
const armarx::ProfilerEventList& events,
const Ice::Current& = Ice::emptyCurrent)
override;
117 void reportStatechartTransitionList(
const armarx::ProfilerStatechartTransitionList& transitions,
const Ice::Current& = Ice::emptyCurrent)
override;
122 void reportProcessCpuUsageList(
const armarx::ProfilerProcessCpuUsageList& processes,
const Ice::Current& = Ice::emptyCurrent)
override;
123 void reportProcessMemoryUsageList(
const armarx::ProfilerProcessMemoryUsageList& memoryUsages,
const Ice::Current& = Ice::emptyCurrent)
override;
129 void saveToLongtermMemory();
130 void saveTransitionsToLongtermMemory();
132 struct TransitionSnapshot
134 armarx::ProfilerStatechartTransition transition;
138 using TransitionSnapshotList = std::vector<TransitionSnapshot>;
140 CommonStorageInterfacePrx commonStoragePrx;
141 WorkingMemoryInterfacePrx workingMemoryPrx;
142 LongtermMemoryInterfacePrx longtermMemoryPrx;
143 PersistentProfilerDataSegmentBasePrx profilerDataSegmentPrx;
148 std::mutex entityLogMutex;
149 memoryx::EntityBaseList entityLog;
150 std::mutex transitionSnapshotListMutex;
151 TransitionSnapshotList transitionSnapshotList;