10 #ifndef Navigation_WorldStatistics_H
11 #define Navigation_WorldStatistics_H
23 class VisualDebugAttributeGroup;
24 class VisualDebugServer;
29 WorldUpdateStep_WorldUpdate = 0,
30 WorldUpdateStep_WorldUpdateAllButVisualDebug ,
31 WorldUpdateStep_SendVisualDebugData ,
32 WorldUpdateStep_ProcessQueuesInWorldUpdate ,
33 WorldUpdateStep_FlushQueries ,
34 WorldUpdateStep_UpdateDatabases ,
35 WorldUpdateStep_UpdateDynamicNavMesh ,
36 WorldUpdateStep_UpdateSpatializations ,
37 WorldUpdateStep_UpdateBotsPathFollowing ,
38 WorldUpdateStep_QueryQueueProcess ,
40 WorldUpdateStepIndex_Count
43 enum WorldSummaryAttributes
45 WorldSummaryAttributes_worldUpdateStat,
46 WorldSummaryAttributes_visualDebugTime,
47 WorldSummaryAttributes_queriesTime,
48 WorldSummaryAttributes_navdata_count,
49 WorldSummaryAttributes_bot_count,
50 WorldSummaryAttributes_obstacle_count,
51 WorldSummaryAttributes_tagvolume_count,
52 WorldSummaryAttributes_database_count,
53 WorldSummaryAttributes_memory_footprint
56 enum CountersAttributes
58 CountersAttributes_NavDataCount ,
59 CountersAttributes_NotEmptyDatabaseCount ,
60 CountersAttributes_MaxDatabasesCount ,
61 CountersAttributes_BotCount ,
62 CountersAttributes_ObstaclesTotalCount ,
63 CountersAttributes_BoxObstaclesCount ,
64 CountersAttributes_CylinderObstaclesCount ,
65 CountersAttributes_TagVolumeTotalCount ,
66 CountersAttributes_TagVolumeToBeIntegratedCount,
67 CountersAttributes_TagVolumeIntegratedCount ,
68 CountersAttributes_TagVolumeToBeRemovedCount ,
69 CountersAttributes_PointOfInterestCount
74 MemoryAttributes_TotalFootprint,
75 MemoryAttributes_TotalUsedSpace
78 enum SettingsAttributes
80 SettingsAttributes_NbFramesForShortcutTrajectoryPeriodicUpdate,
93 , m_boxObstaclesCount(0)
94 , m_cylinderObstaclesCount(0)
95 , m_pointsOfInterestCount(0)
96 , m_tagVolumesToBeIntegratedCount(0)
97 , m_tagVolumesIntegratedCount(0)
98 , m_tagVolumesToBeRemovedCount(0)
100 , m_notEmptyDatabaseCount(0)
101 , m_summaryAttributesGroup(KY_NULL)
102 , m_profilingAttributesGroup(KY_NULL)
103 , m_countersAttributesGroup(KY_NULL)
104 , m_settingsAttributesGroup(KY_NULL)
107 void Initialize(World* world);
109 const FloatStat& GetWorldUpdateStepStat(WorldUpdateStep worldStat)
const {
return m_worldUpdateStepStats[worldStat]; }
112 void UpdateVisualDebug();
113 void ResetStatValues();
115 KyFloat32* GetWorldUpdateStepTimeToUpdate(WorldUpdateStep worldStat);
117 void CreateSummaryAttributes();
118 void UpdateSummaryAttributes();
119 void CreateProfilingStatsAttributeGroup();
120 void UpdateProfilingStatsAttributeGroup();
121 void CreateCountersAttributeGroup();
122 void UpdateCountersAttributeGroup();
123 void CreateSettingsAttributeGroup();
124 void UpdateSettingsAttributeGroup();
126 void Report(StringBuffer* report)
const;
131 KyArray<FloatStat> m_worldUpdateStepStats;
138 KyUInt32 m_tagVolumesToBeIntegratedCount;
139 KyUInt32 m_tagVolumesIntegratedCount;
140 KyUInt32 m_tagVolumesToBeRemovedCount;
144 VisualDebugAttributeGroup* m_summaryAttributesGroup;
145 VisualDebugAttributeGroup* m_profilingAttributesGroup;
146 VisualDebugAttributeGroup* m_countersAttributesGroup;
147 VisualDebugAttributeGroup* m_settingsAttributesGroup;
150 #ifndef KY_BUILD_SHIPPING
153 #define KY_PROFILE_WORLD_UPDATE_STEP(x) \
154 ScopedProfilerMs scopedProfilerMs(this->m_statistics->GetWorldUpdateStepTimeToUpdate(WorldUpdateStep_##x)); \
155 KY_SCOPED_PERF_MARKER("World::" #x);
157 #define KY_PROFILE_WORLD_UPDATE_STEP(x)
#define KY_NULL
Null value.
Definition: types.h:247
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43