3 #include "IDebugSnapshotReceiver.h"
4 #include "ITimestampProvider.h"
5 #include "../../GrailData/DebugInfo/GrailDebugInfo.h"
19 void ResetDebugInfo();
26 template<
typename SnapshotType>
27 void ProcessNewSnapshot(SnapshotType& snapshot,
28 std::vector<SnapshotType>& snapshotList)
30 debugInfo.endTime = std::fmax(snapshot.absoluteTime, debugInfo.endTime);
31 snapshot.relativeTime = timestampProvider->GetTimestamp() - debugInfo.startTime;
32 snapshotList.push_back(snapshot);
35 template<
typename SnapshotType>
36 void ProcessReasonerSnapshot(SnapshotType& reasonerSnapshot,
37 std::map<
size_t, std::vector<SnapshotType>>& listsPerEntity,
40 auto iter = listsPerEntity.find(entityId);
41 if (iter == listsPerEntity.end())
43 std::vector<SnapshotType> snapshots;
44 ProcessNewSnapshot(reasonerSnapshot, snapshots);
45 listsPerEntity[entityId] = std::move(snapshots);
49 ProcessNewSnapshot(reasonerSnapshot, iter->second);
54 std::shared_ptr<ITimestampProvider> timestampProvider =
nullptr;
Definition: DebugInfoGenerator.h:13
Definition: IDebugSnapshotReceiver.h:7
Definition: GrailDebugInfo.h:15
Definition: GrailStateSnapshot.h:14
Definition: PlannerSnapshots.h:70
Definition: SimulatedGamesSnapshots.h:95
Definition: UtilityReasonerSnapshot.h:11