Flecs: include/flecs/addons/stats.h Source File
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.0 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
stats.h
Go to the documentation of this file.
1
14
15#ifdef FLECS_STATS
16
24
25#ifndef FLECS_STATS_H
26#define FLECS_STATS_H
27
28#ifndef FLECS_MODULE
29#define FLECS_MODULE
30#endif
31
32#ifndef FLECS_PIPELINE
33#define FLECS_PIPELINE
34#endif
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40#define ECS_STAT_WINDOW (60)
41
43 typedef struct ecs_gauge_t {
44 ecs_float_t avg[ECS_STAT_WINDOW];
45 ecs_float_t min[ECS_STAT_WINDOW];
46 ecs_float_t max[ECS_STAT_WINDOW];
47} ecs_gauge_t;
48
50 typedef struct ecs_counter_t {
51 ecs_gauge_t rate;
52 double value[ECS_STAT_WINDOW];
53} ecs_counter_t;
54
56 typedef union ecs_metric_t {
57 ecs_gauge_t gauge;
58 ecs_counter_t counter;
59} ecs_metric_t;
60
61 typedef struct ecs_world_stats_t {
62 int64_t first_;
63
64 /* Entities */
65 struct {
66 ecs_metric_t count;
67 ecs_metric_t not_alive_count;
68 } entities;
69
70 /* Component ids */
71 struct {
72 ecs_metric_t tag_count;
73 ecs_metric_t component_count;
74 ecs_metric_t pair_count;
75 ecs_metric_t type_count;
76 ecs_metric_t create_count;
77 ecs_metric_t delete_count;
78 } components;
79
80 /* Tables */
81 struct {
82 ecs_metric_t count;
83 ecs_metric_t empty_count;
84 ecs_metric_t create_count;
85 ecs_metric_t delete_count;
86 } tables;
87
88 /* Queries & events */
89 struct {
90 ecs_metric_t query_count;
91 ecs_metric_t observer_count;
92 ecs_metric_t system_count;
93 } queries;
94
95 /* Commands */
96 struct {
97 ecs_metric_t add_count;
98 ecs_metric_t remove_count;
99 ecs_metric_t delete_count;
100 ecs_metric_t clear_count;
101 ecs_metric_t set_count;
102 ecs_metric_t ensure_count;
103 ecs_metric_t modified_count;
104 ecs_metric_t other_count;
105 ecs_metric_t discard_count;
106 ecs_metric_t batched_entity_count;
107 ecs_metric_t batched_count;
108 } commands;
109
110 /* Frame data */
111 struct {
112 ecs_metric_t frame_count;
113 ecs_metric_t merge_count;
114 ecs_metric_t rematch_count;
115 ecs_metric_t pipeline_build_count;
116 ecs_metric_t systems_ran;
117 ecs_metric_t observers_ran;
118 ecs_metric_t event_emit_count;
119 } frame;
120
121 /* Timing */
122 struct {
123 ecs_metric_t world_time_raw;
124 ecs_metric_t world_time;
125 ecs_metric_t frame_time;
126 ecs_metric_t system_time;
127 ecs_metric_t emit_time;
128 ecs_metric_t merge_time;
129 ecs_metric_t rematch_time;
130 ecs_metric_t fps;
131 ecs_metric_t delta_time;
132 } performance;
133
134 struct {
135 /* Memory allocation data */
136 ecs_metric_t alloc_count;
137 ecs_metric_t realloc_count;
138 ecs_metric_t free_count;
139 ecs_metric_t outstanding_alloc_count;
140
141 /* Memory allocator data */
142 ecs_metric_t block_alloc_count;
143 ecs_metric_t block_free_count;
144 ecs_metric_t block_outstanding_alloc_count;
145 ecs_metric_t stack_alloc_count;
146 ecs_metric_t stack_free_count;
147 ecs_metric_t stack_outstanding_alloc_count;
148 } memory;
149
150 /* HTTP statistics */
151 struct {
152 ecs_metric_t request_received_count;
153 ecs_metric_t request_invalid_count;
154 ecs_metric_t request_handled_ok_count;
155 ecs_metric_t request_handled_error_count;
156 ecs_metric_t request_not_handled_count;
157 ecs_metric_t request_preflight_count;
158 ecs_metric_t send_ok_count;
159 ecs_metric_t send_error_count;
160 ecs_metric_t busy_count;
161 } http;
162
163 int64_t last_;
164
166 int32_t t;
167} ecs_world_stats_t;
168
170 typedef struct ecs_query_stats_t {
171 int64_t first_;
172 ecs_metric_t result_count;
173 ecs_metric_t matched_table_count;
174 ecs_metric_t matched_entity_count;
175 int64_t last_;
176
178 int32_t t;
179} ecs_query_stats_t;
180
182 typedef struct ecs_system_stats_t {
183 int64_t first_;
184 ecs_metric_t time_spent;
185 int64_t last_;
186
187 bool task;
188
189 ecs_query_stats_t query;
190} ecs_system_stats_t;
191
193 typedef struct ecs_sync_stats_t {
194 int64_t first_;
195 ecs_metric_t time_spent;
196 ecs_metric_t commands_enqueued;
197 int64_t last_;
198
199 int32_t system_count;
200 bool multi_threaded;
201 bool immediate;
202} ecs_sync_stats_t;
203
205 typedef struct ecs_pipeline_stats_t {
206 /* Allow for initializing struct with {0} */
207 int8_t canary_;
208
211 ecs_vec_t systems;
212
214 ecs_vec_t sync_points;
215
217 int32_t t;
218
219 int32_t system_count;
220 int32_t active_system_count;
221 int32_t rebuild_count;
222} ecs_pipeline_stats_t;
223
229FLECS_API
230 void ecs_world_stats_get(
231 const ecs_world_t *world,
232 ecs_world_stats_t *stats);
233
235FLECS_API
236 void ecs_world_stats_reduce(
237 ecs_world_stats_t *dst,
238 const ecs_world_stats_t *src);
239
241FLECS_API
242 void ecs_world_stats_reduce_last(
243 ecs_world_stats_t *stats,
244 const ecs_world_stats_t *old,
245 int32_t count);
246
248FLECS_API
249 void ecs_world_stats_repeat_last(
250 ecs_world_stats_t *stats);
251
253FLECS_API
254 void ecs_world_stats_copy_last(
255 ecs_world_stats_t *dst,
256 const ecs_world_stats_t *src);
257
258FLECS_API
259void ecs_world_stats_log(
260 const ecs_world_t *world,
261 const ecs_world_stats_t *stats);
262
270FLECS_API
271 void ecs_query_stats_get(
272 const ecs_world_t *world,
273 const ecs_query_t *query,
274 ecs_query_stats_t *stats);
275
277FLECS_API
278 void ecs_query_cache_stats_reduce(
279 ecs_query_stats_t *dst,
280 const ecs_query_stats_t *src);
281
283FLECS_API
284 void ecs_query_cache_stats_reduce_last(
285 ecs_query_stats_t *stats,
286 const ecs_query_stats_t *old,
287 int32_t count);
288
290FLECS_API
291 void ecs_query_cache_stats_repeat_last(
292 ecs_query_stats_t *stats);
293
295FLECS_API
296 void ecs_query_cache_stats_copy_last(
297 ecs_query_stats_t *dst,
298 const ecs_query_stats_t *src);
299
308FLECS_API
309 bool ecs_system_stats_get(
310 const ecs_world_t *world,
311 ecs_entity_t system,
312 ecs_system_stats_t *stats);
313
315FLECS_API
316 void ecs_system_stats_reduce(
317 ecs_system_stats_t *dst,
318 const ecs_system_stats_t *src);
319
321FLECS_API
322 void ecs_system_stats_reduce_last(
323 ecs_system_stats_t *stats,
324 const ecs_system_stats_t *old,
325 int32_t count);
326
328FLECS_API
329 void ecs_system_stats_repeat_last(
330 ecs_system_stats_t *stats);
331
333FLECS_API
334 void ecs_system_stats_copy_last(
335 ecs_system_stats_t *dst,
336 const ecs_system_stats_t *src);
337
346FLECS_API
347 bool ecs_pipeline_stats_get(
348 ecs_world_t *world,
349 ecs_entity_t pipeline,
350 ecs_pipeline_stats_t *stats);
351
356FLECS_API
357 void ecs_pipeline_stats_fini(
358 ecs_pipeline_stats_t *stats);
359
361FLECS_API
362 void ecs_pipeline_stats_reduce(
363 ecs_pipeline_stats_t *dst,
364 const ecs_pipeline_stats_t *src);
365
367FLECS_API
368 void ecs_pipeline_stats_reduce_last(
369 ecs_pipeline_stats_t *stats,
370 const ecs_pipeline_stats_t *old,
371 int32_t count);
372
374FLECS_API
375 void ecs_pipeline_stats_repeat_last(
376 ecs_pipeline_stats_t *stats);
377
385FLECS_API
386 void ecs_pipeline_stats_copy_last(
387 ecs_pipeline_stats_t *dst,
388 const ecs_pipeline_stats_t *src);
389
391FLECS_API
392 void ecs_metric_reduce(
393 ecs_metric_t *dst,
394 const ecs_metric_t *src,
395 int32_t t_dst,
396 int32_t t_src);
397
399FLECS_API
400 void ecs_metric_reduce_last(
401 ecs_metric_t *m,
402 int32_t t,
403 int32_t count);
404
406FLECS_API
407 void ecs_metric_copy(
408 ecs_metric_t *m,
409 int32_t dst,
410 int32_t src);
411
412FLECS_API extern ECS_COMPONENT_DECLARE(FlecsStats);
413FLECS_API extern ECS_COMPONENT_DECLARE(EcsWorldStats);
414FLECS_API extern ECS_COMPONENT_DECLARE(EcsWorldSummary);
415FLECS_API extern ECS_COMPONENT_DECLARE(EcsSystemStats);
416FLECS_API extern ECS_COMPONENT_DECLARE(EcsPipelineStats);
417
418FLECS_API extern ecs_entity_t EcsPeriod1s;
419FLECS_API extern ecs_entity_t EcsPeriod1m;
420FLECS_API extern ecs_entity_t EcsPeriod1h;
421FLECS_API extern ecs_entity_t EcsPeriod1d;
422FLECS_API extern ecs_entity_t EcsPeriod1w;
423
425 typedef struct {
426 ecs_ftime_t elapsed;
427 int32_t reduce_count;
428} EcsStatsHeader;
429
431 typedef struct {
432 EcsStatsHeader hdr;
433 ecs_world_stats_t stats;
434} EcsWorldStats;
435
437 typedef struct {
438 EcsStatsHeader hdr;
439 ecs_map_t stats;
440} EcsSystemStats;
441
443 typedef struct {
444 EcsStatsHeader hdr;
445 ecs_map_t stats;
446} EcsPipelineStats;
447
449 typedef struct {
450 /* Time */
451 double target_fps;
452 double time_scale;
453
454 /* Total time */
455 double frame_time_total;
456 double system_time_total;
457 double merge_time_total;
458
459 /* Last frame time */
460 double frame_time_last;
461 double system_time_last;
462 double merge_time_last;
463
464 int64_t frame_count;
465 int64_t command_count;
466
467 /* Build info */
468 ecs_build_info_t build_info;
469} EcsWorldSummary;
470
479FLECS_API
480 void FlecsStatsImport(
481 ecs_world_t *world);
482
483#ifdef __cplusplus
484}
485#endif
486
487#endif
488
490
491#endif
ecs_world_stats_reduce
FLECS_API void ecs_world_stats_reduce(ecs_world_stats_t *dst, const ecs_world_stats_t *src)
Reduce source measurement window into single destination measurement.
ecs_query_stats_get
FLECS_API void ecs_query_stats_get(const ecs_world_t *world, const ecs_query_t *query, ecs_query_stats_t *stats)
Get query statistics.
ecs_query_cache_stats_reduce_last
FLECS_API void ecs_query_cache_stats_reduce_last(ecs_query_stats_t *stats, const ecs_query_stats_t *old, int32_t count)
Reduce last measurement into previous measurement, restore old value.
ecs_world_stats_get
FLECS_API void ecs_world_stats_get(const ecs_world_t *world, ecs_world_stats_t *stats)
Get world statistics.
EcsPeriod1s
FLECS_API ecs_entity_t EcsPeriod1s
Tag used for metrics collected in last second.
EcsPeriod1h
FLECS_API ecs_entity_t EcsPeriod1h
Tag used for metrics collected in last hour.
ecs_pipeline_stats_reduce_last
FLECS_API void ecs_pipeline_stats_reduce_last(ecs_pipeline_stats_t *stats, const ecs_pipeline_stats_t *old, int32_t count)
Reduce last measurement into previous measurement, restore old value.
ecs_query_cache_stats_repeat_last
FLECS_API void ecs_query_cache_stats_repeat_last(ecs_query_stats_t *stats)
Repeat last measurement.
ecs_metric_reduce_last
FLECS_API void ecs_metric_reduce_last(ecs_metric_t *m, int32_t t, int32_t count)
Reduce last measurement into previous measurement.
ecs_system_stats_get
FLECS_API bool ecs_system_stats_get(const ecs_world_t *world, ecs_entity_t system, ecs_system_stats_t *stats)
Get system statistics.
ecs_world_stats_reduce_last
FLECS_API void ecs_world_stats_reduce_last(ecs_world_stats_t *stats, const ecs_world_stats_t *old, int32_t count)
Reduce last measurement into previous measurement, restore old value.
ecs_query_cache_stats_reduce
FLECS_API void ecs_query_cache_stats_reduce(ecs_query_stats_t *dst, const ecs_query_stats_t *src)
Reduce source measurement window into single destination measurement.
FlecsStatsImport
FLECS_API void FlecsStatsImport(ecs_world_t *world)
Stats module import function.
ecs_metric_copy
FLECS_API void ecs_metric_copy(ecs_metric_t *m, int32_t dst, int32_t src)
Copy measurement.
ecs_pipeline_stats_repeat_last
FLECS_API void ecs_pipeline_stats_repeat_last(ecs_pipeline_stats_t *stats)
Repeat last measurement.
ecs_pipeline_stats_fini
FLECS_API void ecs_pipeline_stats_fini(ecs_pipeline_stats_t *stats)
Free pipeline stats.
ecs_pipeline_stats_copy_last
FLECS_API void ecs_pipeline_stats_copy_last(ecs_pipeline_stats_t *dst, const ecs_pipeline_stats_t *src)
Copy last measurement to destination.
ecs_system_stats_reduce
FLECS_API void ecs_system_stats_reduce(ecs_system_stats_t *dst, const ecs_system_stats_t *src)
Reduce source measurement window into single destination measurement.
ecs_pipeline_stats_reduce
FLECS_API void ecs_pipeline_stats_reduce(ecs_pipeline_stats_t *dst, const ecs_pipeline_stats_t *src)
Reduce source measurement window into single destination measurement.
ecs_system_stats_copy_last
FLECS_API void ecs_system_stats_copy_last(ecs_system_stats_t *dst, const ecs_system_stats_t *src)
Copy last measurement from source to destination.
ecs_system_stats_repeat_last
FLECS_API void ecs_system_stats_repeat_last(ecs_system_stats_t *stats)
Repeat last measurement.
ecs_world_stats_repeat_last
FLECS_API void ecs_world_stats_repeat_last(ecs_world_stats_t *stats)
Repeat last measurement.
ecs_world_stats_copy_last
FLECS_API void ecs_world_stats_copy_last(ecs_world_stats_t *dst, const ecs_world_stats_t *src)
Copy last measurement from source to destination.
ecs_metric_reduce
FLECS_API void ecs_metric_reduce(ecs_metric_t *dst, const ecs_metric_t *src, int32_t t_dst, int32_t t_src)
Reduce all measurements from a window into a single measurement.
EcsPeriod1m
FLECS_API ecs_entity_t EcsPeriod1m
Tag used for metrics collected in last minute.
ecs_pipeline_stats_get
FLECS_API bool ecs_pipeline_stats_get(ecs_world_t *world, ecs_entity_t pipeline, ecs_pipeline_stats_t *stats)
Get pipeline statistics.
EcsPeriod1w
FLECS_API ecs_entity_t EcsPeriod1w
Tag used for metrics collected in last week.
ecs_system_stats_reduce_last
FLECS_API void ecs_system_stats_reduce_last(ecs_system_stats_t *stats, const ecs_system_stats_t *old, int32_t count)
Reduce last measurement into previous measurement, restore old value.
EcsPeriod1d
FLECS_API ecs_entity_t EcsPeriod1d
Tag used for metrics collected in last day.
ecs_query_cache_stats_copy_last
FLECS_API void ecs_query_cache_stats_copy_last(ecs_query_stats_t *dst, const ecs_query_stats_t *src)
Copy last measurement from source to destination.
ecs_entity_t
ecs_id_t ecs_entity_t
An entity identifier.
Definition flecs.h:381
ecs_world_t
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
Definition flecs.h:425
ECS_COMPONENT_DECLARE
#define ECS_COMPONENT_DECLARE(id)
Forward declare a component.
Definition flecs_c.h:112
ecs_ftime_t
#define ecs_ftime_t
Customizable precision for scalar time values.
Definition flecs.h:59
ecs_float_t
#define ecs_float_t
Customizable precision for floating point operations.
Definition flecs.h:52
EcsPipelineStats
Component that stores pipeline statistics.
Definition stats.h:443
EcsStatsHeader
Common data for statistics.
Definition stats.h:425
EcsSystemStats
Component that stores system statistics.
Definition stats.h:437
EcsWorldStats
Component that stores world statistics.
Definition stats.h:431
EcsWorldSummary
Component that stores a summary of world statistics.
Definition stats.h:449
EcsWorldSummary::target_fps
double target_fps
Target FPS.
Definition stats.h:451
EcsWorldSummary::merge_time_total
double merge_time_total
Total time spent in merges.
Definition stats.h:457
EcsWorldSummary::frame_time_last
double frame_time_last
Time spent processing a frame.
Definition stats.h:460
EcsWorldSummary::frame_count
int64_t frame_count
Number of frames processed.
Definition stats.h:464
EcsWorldSummary::system_time_last
double system_time_last
Time spent in systems.
Definition stats.h:461
EcsWorldSummary::build_info
ecs_build_info_t build_info
Build info.
Definition stats.h:468
EcsWorldSummary::system_time_total
double system_time_total
Total time spent in systems.
Definition stats.h:456
EcsWorldSummary::frame_time_total
double frame_time_total
Total time spent processing a frame.
Definition stats.h:455
EcsWorldSummary::merge_time_last
double merge_time_last
Time spent in merges.
Definition stats.h:462
EcsWorldSummary::time_scale
double time_scale
Simulation time scale.
Definition stats.h:452
EcsWorldSummary::command_count
int64_t command_count
Number of commands processed.
Definition stats.h:465
ecs_build_info_t
Type with information about the current Flecs build.
Definition flecs.h:1426
ecs_counter_t
Monotonically increasing counter.
Definition stats.h:50
ecs_counter_t::rate
ecs_gauge_t rate
Keep track of deltas too.
Definition stats.h:51
ecs_gauge_t
Simple value that indicates current state.
Definition stats.h:43
ecs_pipeline_stats_t
Statistics for all systems in a pipeline.
Definition stats.h:205
ecs_pipeline_stats_t::rebuild_count
int32_t rebuild_count
Number of times pipeline has rebuilt.
Definition stats.h:221
ecs_pipeline_stats_t::system_count
int32_t system_count
Number of systems in pipeline.
Definition stats.h:219
ecs_pipeline_stats_t::systems
ecs_vec_t systems
Vector with system ids of all systems in the pipeline.
Definition stats.h:211
ecs_pipeline_stats_t::active_system_count
int32_t active_system_count
Number of active systems in pipeline.
Definition stats.h:220
ecs_pipeline_stats_t::sync_points
ecs_vec_t sync_points
Vector with sync point stats.
Definition stats.h:214
ecs_pipeline_stats_t::t
int32_t t
Current position in ring buffer.
Definition stats.h:217
ecs_query_stats_t
Statistics for a single query (use ecs_query_cache_stats_get)
Definition stats.h:170
ecs_query_stats_t::result_count
ecs_metric_t result_count
Number of query results.
Definition stats.h:172
ecs_query_stats_t::t
int32_t t
Current position in ringbuffer.
Definition stats.h:178
ecs_query_stats_t::matched_table_count
ecs_metric_t matched_table_count
Number of matched tables.
Definition stats.h:173
ecs_query_stats_t::matched_entity_count
ecs_metric_t matched_entity_count
Number of matched entities.
Definition stats.h:174
ecs_query_t
Queries are lists of constraints (terms) that match entities.
Definition flecs.h:813
ecs_sync_stats_t
Statistics for sync point.
Definition stats.h:193
ecs_system_stats_t
Statistics for a single system (use ecs_system_stats_get())
Definition stats.h:182
ecs_system_stats_t::task
bool task
Is system a task.
Definition stats.h:187
ecs_system_stats_t::time_spent
ecs_metric_t time_spent
Time spent processing a system.
Definition stats.h:184
ecs_world_stats_t
Definition stats.h:61
ecs_world_stats_t::alloc_count
ecs_metric_t alloc_count
Allocs per frame.
Definition stats.h:136
ecs_world_stats_t::block_free_count
ecs_metric_t block_free_count
Block frees per frame.
Definition stats.h:143
ecs_world_stats_t::system_time
ecs_metric_t system_time
Time spent on running systems.
Definition stats.h:126
ecs_world_stats_t::world_time_raw
ecs_metric_t world_time_raw
Actual time passed since simulation start (first time progress() is called)
Definition stats.h:123
ecs_world_stats_t::delete_count
ecs_metric_t delete_count
Number of times id has been deleted.
Definition stats.h:77
ecs_world_stats_t::rematch_count
ecs_metric_t rematch_count
Number of query rematches.
Definition stats.h:114
ecs_world_stats_t::frame_time
ecs_metric_t frame_time
Time spent processing a frame.
Definition stats.h:125
ecs_world_stats_t::tag_count
ecs_metric_t tag_count
Number of tag ids (ids without data)
Definition stats.h:72
ecs_world_stats_t::component_count
ecs_metric_t component_count
Number of components ids (ids with data)
Definition stats.h:73
ecs_world_stats_t::system_count
ecs_metric_t system_count
Number of systems.
Definition stats.h:92
ecs_world_stats_t::merge_count
ecs_metric_t merge_count
Number of merges executed.
Definition stats.h:113
ecs_world_stats_t::free_count
ecs_metric_t free_count
Frees per frame.
Definition stats.h:138
ecs_world_stats_t::query_count
ecs_metric_t query_count
Number of queries.
Definition stats.h:90
ecs_world_stats_t::world_time
ecs_metric_t world_time
Simulation time passed since simulation start.
Definition stats.h:124
ecs_world_stats_t::realloc_count
ecs_metric_t realloc_count
Reallocs per frame.
Definition stats.h:137
ecs_world_stats_t::merge_time
ecs_metric_t merge_time
Time spent on merging commands.
Definition stats.h:128
ecs_world_stats_t::outstanding_alloc_count
ecs_metric_t outstanding_alloc_count
Difference between allocs & frees.
Definition stats.h:139
ecs_world_stats_t::observers_ran
ecs_metric_t observers_ran
Number of times an observer was invoked.
Definition stats.h:117
ecs_world_stats_t::frame_count
ecs_metric_t frame_count
Number of frames processed.
Definition stats.h:112
ecs_world_stats_t::event_emit_count
ecs_metric_t event_emit_count
Number of events emitted.
Definition stats.h:118
ecs_world_stats_t::empty_count
ecs_metric_t empty_count
Number of empty tables.
Definition stats.h:83
ecs_world_stats_t::block_outstanding_alloc_count
ecs_metric_t block_outstanding_alloc_count
Difference between allocs & frees.
Definition stats.h:144
ecs_world_stats_t::t
int32_t t
Current position in ring buffer.
Definition stats.h:166
ecs_world_stats_t::stack_free_count
ecs_metric_t stack_free_count
Page frees per frame.
Definition stats.h:146
ecs_world_stats_t::rematch_time
ecs_metric_t rematch_time
Time spent on rematching.
Definition stats.h:129
ecs_world_stats_t::fps
ecs_metric_t fps
Frames per second.
Definition stats.h:130
ecs_world_stats_t::systems_ran
ecs_metric_t systems_ran
Number of systems ran.
Definition stats.h:116
ecs_world_stats_t::type_count
ecs_metric_t type_count
Number of registered types.
Definition stats.h:75
ecs_world_stats_t::count
ecs_metric_t count
Number of entities.
Definition stats.h:66
ecs_world_stats_t::emit_time
ecs_metric_t emit_time
Time spent on notifying observers.
Definition stats.h:127
ecs_world_stats_t::create_count
ecs_metric_t create_count
Number of times id has been created.
Definition stats.h:76
ecs_world_stats_t::not_alive_count
ecs_metric_t not_alive_count
Number of not alive (recyclable) entity ids.
Definition stats.h:67
ecs_world_stats_t::stack_alloc_count
ecs_metric_t stack_alloc_count
Page allocations per frame.
Definition stats.h:145
ecs_world_stats_t::observer_count
ecs_metric_t observer_count
Number of observers.
Definition stats.h:91
ecs_world_stats_t::pipeline_build_count
ecs_metric_t pipeline_build_count
Number of system pipeline rebuilds (occurs when an inactive system becomes active).
Definition stats.h:115
ecs_world_stats_t::stack_outstanding_alloc_count
ecs_metric_t stack_outstanding_alloc_count
Difference between allocs & frees.
Definition stats.h:147
ecs_world_stats_t::block_alloc_count
ecs_metric_t block_alloc_count
Block allocations per frame.
Definition stats.h:142
ecs_world_stats_t::delta_time
ecs_metric_t delta_time
Delta_time.
Definition stats.h:131
ecs_world_stats_t::pair_count
ecs_metric_t pair_count
Number of pair ids.
Definition stats.h:74
ecs_metric_t
Make all metrics the same size, so we can iterate over fields.
Definition stats.h:56