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
15#ifdef FLECS_STATS
16
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
43typedef 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];
48
50typedef struct ecs_counter_t {
52 double value[ECS_STAT_WINDOW];
54
56typedef union ecs_metric_t {
57 ecs_gauge_t gauge;
58 ecs_counter_t counter;
60
61typedef struct ecs_world_stats_t {
62 int64_t first_;
63
64 /* Entities */
65 struct {
68 } entities;
69
70 /* Component ids */
71 struct {
78 } components;
79
80 /* Tables */
81 struct {
86 } tables;
87
88 /* Queries & events */
89 struct {
93 } queries;
94
95 /* Commands */
96 struct {
97 ecs_metric_t add_count;
98 ecs_metric_t remove_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 {
119 } frame;
120
121 /* Timing */
122 struct {
132 } performance;
133
134 struct {
135 /* Memory allocation data */
141 /* Memory allocator data */
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;
168
180
182typedef struct ecs_system_stats_t {
183 int64_t first_;
185 int64_t last_;
186
187 bool task;
189 ecs_query_stats_t query;
191
193typedef 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;
203
205typedef 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;
223
229FLECS_API
231 const ecs_world_t *world,
232 ecs_world_stats_t *stats);
233
235FLECS_API
238 const ecs_world_stats_t *src);
239
241FLECS_API
243 ecs_world_stats_t *stats,
244 const ecs_world_stats_t *old,
245 int32_t count);
246
248FLECS_API
250 ecs_world_stats_t *stats);
251
253FLECS_API
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
272 const ecs_world_t *world,
273 const ecs_query_t *query,
274 ecs_query_stats_t *stats);
275
277FLECS_API
280 const ecs_query_stats_t *src);
281
283FLECS_API
285 ecs_query_stats_t *stats,
286 const ecs_query_stats_t *old,
287 int32_t count);
288
290FLECS_API
292 ecs_query_stats_t *stats);
293
295FLECS_API
298 const ecs_query_stats_t *src);
299
308FLECS_API
310 const ecs_world_t *world,
311 ecs_entity_t system,
312 ecs_system_stats_t *stats);
313
315FLECS_API
318 const ecs_system_stats_t *src);
319
321FLECS_API
323 ecs_system_stats_t *stats,
324 const ecs_system_stats_t *old,
325 int32_t count);
326
328FLECS_API
330 ecs_system_stats_t *stats);
331
333FLECS_API
336 const ecs_system_stats_t *src);
337
346FLECS_API
348 ecs_world_t *world,
349 ecs_entity_t pipeline,
350 ecs_pipeline_stats_t *stats);
351
356FLECS_API
358 ecs_pipeline_stats_t *stats);
359
361FLECS_API
364 const ecs_pipeline_stats_t *src);
365
367FLECS_API
370 const ecs_pipeline_stats_t *old,
371 int32_t count);
372
374FLECS_API
376 ecs_pipeline_stats_t *stats);
377
385FLECS_API
388 const ecs_pipeline_stats_t *src);
389
391FLECS_API
393 ecs_metric_t *dst,
394 const ecs_metric_t *src,
395 int32_t t_dst,
396 int32_t t_src);
397
399FLECS_API
401 ecs_metric_t *m,
402 int32_t t,
403 int32_t count);
404
406FLECS_API
408 ecs_metric_t *m,
409 int32_t dst,
410 int32_t src);
411
412FLECS_API extern ECS_COMPONENT_DECLARE(FlecsStats);
418/* Memory statistics components */
429FLECS_API extern ecs_entity_t EcsPeriod1s;
430FLECS_API extern ecs_entity_t EcsPeriod1m;
431FLECS_API extern ecs_entity_t EcsPeriod1h;
432FLECS_API extern ecs_entity_t EcsPeriod1d;
433FLECS_API extern ecs_entity_t EcsPeriod1w;
436typedef struct {
437 ecs_ftime_t elapsed;
438 int32_t reduce_count;
440
442typedef struct {
443 EcsStatsHeader hdr;
444 ecs_world_stats_t *stats;
446
448typedef struct {
449 EcsStatsHeader hdr;
450 ecs_map_t stats;
452
454typedef struct {
455 EcsStatsHeader hdr;
456 ecs_map_t stats;
458
460typedef struct {
461 /* Time */
462 double target_fps;
463 double time_scale;
465 /* Total time */
470 /* Last frame time */
475 int64_t frame_count;
478 /* Build info */
481
483typedef struct {
484 int32_t alive_count;
486 ecs_size_t bytes_alive;
487 ecs_size_t bytes_not_alive;
488 ecs_size_t bytes_unused;
489 ecs_size_t bytes_names;
490 ecs_size_t bytes_doc_names;
492
493/* Component memory. */
504
506typedef struct {
507 int32_t count;
509 ecs_size_t bytes_table_cache;
510 ecs_size_t bytes_name_index;
513 ecs_size_t bytes_type_info;
515
517typedef struct {
518 int32_t count;
519 int32_t cached_count;
520 ecs_size_t bytes_query;
521 ecs_size_t bytes_cache;
522 ecs_size_t bytes_group_by;
523 ecs_size_t bytes_order_by;
524 ecs_size_t bytes_plan;
525 ecs_size_t bytes_terms;
526 ecs_size_t bytes_misc;
528
530#define ECS_TABLE_MEMORY_HISTOGRAM_BUCKET_COUNT 14
531#define ECS_TABLE_MEMORY_HISTOGRAM_MAX_COUNT (1 << ECS_TABLE_MEMORY_HISTOGRAM_BUCKET_COUNT)
532
534typedef struct {
535 int32_t count;
536 int32_t empty_count;
537 int32_t column_count;
538 ecs_size_t bytes_table;
539 ecs_size_t bytes_type;
540 ecs_size_t bytes_entities;
541 ecs_size_t bytes_overrides;
542 ecs_size_t bytes_columns;
544 ecs_size_t bytes_column_map;
546 ecs_size_t bytes_dirty_state;
547 ecs_size_t bytes_edges;
549
551typedef struct {
552 int32_t entity_counts[ECS_TABLE_MEMORY_HISTOGRAM_BUCKET_COUNT];
554
556typedef struct {
557 ecs_size_t bytes_queue;
558 ecs_size_t bytes_entries;
559 ecs_size_t bytes_stack;
561
564typedef struct {
565 ecs_size_t bytes_graph_edge;
567 ecs_size_t bytes_pair_record;
568 ecs_size_t bytes_table_diff;
570 ecs_size_t bytes_hashmap;
571 ecs_size_t bytes_allocator;
573 ecs_size_t bytes_query_impl;
574 ecs_size_t bytes_query_cache;
576
578typedef struct {
579 ecs_entities_memory_t entities;
580 ecs_component_memory_t components;
581 ecs_component_index_memory_t component_index;
582 ecs_query_memory_t query;
583 ecs_table_memory_t table;
584 ecs_table_histogram_t table_histogram;
585 ecs_commands_memory_t commands;
586 ecs_allocator_memory_t allocators;
588
595FLECS_API
597 const ecs_world_t *world);
598
604FLECS_API
606 const ecs_world_t *world);
607
613FLECS_API
615 const ecs_world_t *world);
616
622FLECS_API
624 const ecs_world_t *world);
625
631FLECS_API
633 const ecs_world_t *world);
634
640FLECS_API
642 const ecs_world_t *world);
643
649FLECS_API
651 const ecs_world_t *world);
652
658FLECS_API
660 const ecs_world_t *world);
661
662
671FLECS_API
673 ecs_world_t *world);
674
675#ifdef __cplusplus
676}
677#endif
678
679#endif
680
683#endif
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.
union ecs_metric_t ecs_metric_t
Make all metrics the same size, so we can iterate over fields.
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.
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.
FLECS_API void ecs_world_stats_get(const ecs_world_t *world, ecs_world_stats_t *stats)
Get world statistics.
FLECS_API ecs_entity_t EcsPeriod1s
Tag used for metrics collected in last second.
struct ecs_pipeline_stats_t ecs_pipeline_stats_t
Statistics for all systems in a pipeline.
#define ECS_TABLE_MEMORY_HISTOGRAM_BUCKET_COUNT
Table memory histogram constants.
Definition stats.h:530
FLECS_API ecs_entity_t EcsPeriod1h
Tag used for metrics collected in last hour.
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.
FLECS_API ecs_component_memory_t ecs_component_memory_get(const ecs_world_t *world)
Get memory usage statistics for components.
FLECS_API void ecs_query_cache_stats_repeat_last(ecs_query_stats_t *stats)
Repeat last measurement.
FLECS_API void ecs_metric_reduce_last(ecs_metric_t *m, int32_t t, int32_t count)
Reduce last measurement into previous measurement.
FLECS_API bool ecs_system_stats_get(const ecs_world_t *world, ecs_entity_t system, ecs_system_stats_t *stats)
Get system statistics.
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.
FLECS_API ecs_allocator_memory_t ecs_allocator_memory_get(const ecs_world_t *world)
Get memory usage statistics for allocators.
FLECS_API ecs_table_histogram_t ecs_table_histogram_get(const ecs_world_t *world)
Get number of tables by number of entities in the table.
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.
FLECS_API ecs_query_memory_t ecs_query_memory_get(const ecs_world_t *world)
Get memory usage statistics for queries.
FLECS_API ecs_table_memory_t ecs_table_memory_get(const ecs_world_t *world)
Get memory usage statistics for tables.
struct ecs_query_stats_t ecs_query_stats_t
Statistics for a single query (use ecs_query_cache_stats_get)
FLECS_API void FlecsStatsImport(ecs_world_t *world)
Stats module import function.
FLECS_API void ecs_metric_copy(ecs_metric_t *m, int32_t dst, int32_t src)
Copy measurement.
FLECS_API ecs_entities_memory_t ecs_entity_index_memory_get(const ecs_world_t *world)
Memory statistics getters.
struct ecs_gauge_t ecs_gauge_t
Simple value that indicates current state.
FLECS_API void ecs_pipeline_stats_repeat_last(ecs_pipeline_stats_t *stats)
Repeat last measurement.
FLECS_API void ecs_pipeline_stats_fini(ecs_pipeline_stats_t *stats)
Free pipeline stats.
FLECS_API void ecs_pipeline_stats_copy_last(ecs_pipeline_stats_t *dst, const ecs_pipeline_stats_t *src)
Copy last measurement to destination.
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.
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.
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.
struct ecs_system_stats_t ecs_system_stats_t
Statistics for a single system (use ecs_system_stats_get())
FLECS_API void ecs_system_stats_repeat_last(ecs_system_stats_t *stats)
Repeat last measurement.
FLECS_API void ecs_world_stats_repeat_last(ecs_world_stats_t *stats)
Repeat last measurement.
struct ecs_sync_stats_t ecs_sync_stats_t
Statistics for sync point.
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.
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.
FLECS_API ecs_entity_t EcsPeriod1m
Tag used for metrics collected in last minute.
FLECS_API bool ecs_pipeline_stats_get(ecs_world_t *world, ecs_entity_t pipeline, ecs_pipeline_stats_t *stats)
Get pipeline statistics.
FLECS_API ecs_entity_t EcsPeriod1w
Tag used for metrics collected in last week.
FLECS_API ecs_commands_memory_t ecs_commands_memory_get(const ecs_world_t *world)
Get memory usage statistics for commands.
struct ecs_counter_t ecs_counter_t
Monotonically increasing counter.
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.
FLECS_API ecs_entity_t EcsPeriod1d
Tag used for metrics collected in last day.
FLECS_API ecs_component_index_memory_t ecs_component_index_memory_get(const ecs_world_t *world)
Get memory usage statistics for the component index.
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_id_t ecs_entity_t
An entity identifier.
Definition flecs.h:365
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
Definition flecs.h:409
#define ECS_COMPONENT_DECLARE(id)
Forward declare a component.
Definition flecs_c.h:112
#define ecs_ftime_t
Customizable precision for scalar time values.
Definition flecs.h:59
#define ecs_float_t
Customizable precision for floating point operations.
Definition flecs.h:52
Component that stores pipeline statistics.
Definition stats.h:454
Common data for statistics.
Definition stats.h:436
Component that stores system statistics.
Definition stats.h:448
Component with memory statistics.
Definition stats.h:578
Component that stores world statistics.
Definition stats.h:442
Component that stores a summary of world statistics.
Definition stats.h:460
double target_fps
Target FPS.
Definition stats.h:462
double merge_time_total
Total time spent in merges.
Definition stats.h:468
double frame_time_last
Time spent processing a frame.
Definition stats.h:471
int64_t frame_count
Number of frames processed.
Definition stats.h:475
double system_time_last
Time spent in systems.
Definition stats.h:472
ecs_build_info_t build_info
Build info.
Definition stats.h:479
double system_time_total
Total time spent in systems.
Definition stats.h:467
double frame_time_total
Total time spent processing a frame.
Definition stats.h:466
double merge_time_last
Time spent in merges.
Definition stats.h:473
double time_scale
Simulation time scale.
Definition stats.h:463
int64_t command_count
Number of commands processed.
Definition stats.h:476
Allocator memory.
Definition stats.h:564
ecs_size_t bytes_sparse_chunk
Table diff allocator.
Definition stats.h:569
ecs_size_t bytes_table_diff
Pair record allocator.
Definition stats.h:568
ecs_size_t bytes_query_impl
Command batching entry chunk allocator.
Definition stats.h:573
ecs_size_t bytes_allocator
Hashmap allocator.
Definition stats.h:571
ecs_size_t bytes_hashmap
Sparse chunk allocator.
Definition stats.h:570
ecs_size_t bytes_cmd_entry_chunk
Generic allocator.
Definition stats.h:572
ecs_size_t bytes_pair_record
Component record allocator.
Definition stats.h:567
ecs_size_t bytes_query_cache
Query struct allocator.
Definition stats.h:574
ecs_size_t bytes_component_record
Graph edge allocator.
Definition stats.h:566
Type with information about the current Flecs build.
Definition flecs.h:1446
Commands memory.
Definition stats.h:556
ecs_size_t bytes_entries
Queue size.
Definition stats.h:558
ecs_size_t bytes_stack
Size of sparse set used for command batching.
Definition stats.h:559
Component index memory.
Definition stats.h:506
ecs_size_t bytes_component_record
Number of component records.
Definition stats.h:508
ecs_size_t bytes_ordered_children
Bytes used by name index.
Definition stats.h:511
ecs_size_t bytes_table_cache
Bytes used by ecs_component_record_t struct.
Definition stats.h:509
ecs_size_t bytes_name_index
Bytes used by table cache.
Definition stats.h:510
ecs_size_t bytes_reachable_cache
Bytes used by ordered children vector.
Definition stats.h:512
ecs_size_t bytes_type_info
Bytes used by reachable cache.
Definition stats.h:513
ecs_size_t bytes_sparse_components
Bytes used in bitsets (toggled components).
Definition stats.h:499
ecs_size_t bytes_builtin
Sparse set overhead.
Definition stats.h:502
ecs_size_t bytes_sparse_components_unused
Bytes used in component sparse sets.
Definition stats.h:500
ecs_size_t bytes_sparse_overhead
Unused bytes in component sparse sets.
Definition stats.h:501
ecs_size_t bytes_table_components_unused
Bytes used by table columns.
Definition stats.h:497
ecs_size_t bytes_table_components
Total number of component instances.
Definition stats.h:496
ecs_size_t bytes_toggle_bitsets
Unused bytes in table columns.
Definition stats.h:498
Monotonically increasing counter.
Definition stats.h:50
ecs_gauge_t rate
Keep track of deltas too.
Definition stats.h:51
Entity memory.
Definition stats.h:483
ecs_size_t bytes_alive
Number of not alive entities.
Definition stats.h:486
int32_t not_alive_count
Number of alive entities.
Definition stats.h:485
ecs_size_t bytes_doc_names
Bytes used by names.
Definition stats.h:490
ecs_size_t bytes_not_alive
Bytes used by alive entities.
Definition stats.h:487
ecs_size_t bytes_unused
Bytes used by not alive entities.
Definition stats.h:488
ecs_size_t bytes_names
Allocated but unused bytes.
Definition stats.h:489
Simple value that indicates current state.
Definition stats.h:43
Statistics for all systems in a pipeline.
Definition stats.h:205
int32_t rebuild_count
Number of times pipeline has rebuilt.
Definition stats.h:221
int32_t system_count
Number of systems in pipeline.
Definition stats.h:219
ecs_vec_t systems
Vector with system ids of all systems in the pipeline.
Definition stats.h:211
int32_t active_system_count
Number of active systems in pipeline.
Definition stats.h:220
ecs_vec_t sync_points
Vector with sync point stats.
Definition stats.h:214
int32_t t
Current position in ring buffer.
Definition stats.h:217
Query memory.
Definition stats.h:517
ecs_size_t bytes_cache
Bytes used by ecs_query_impl_t struct.
Definition stats.h:521
ecs_size_t bytes_terms
Bytes used by query plan.
Definition stats.h:525
ecs_size_t bytes_order_by
Bytes used by query cache groups (excludes cache elements).
Definition stats.h:523
int32_t cached_count
Number of queries.
Definition stats.h:519
ecs_size_t bytes_query
Number of queries with caches.
Definition stats.h:520
ecs_size_t bytes_misc
Bytes used by terms array.
Definition stats.h:526
ecs_size_t bytes_group_by
Bytes used by query cache.
Definition stats.h:522
ecs_size_t bytes_plan
Bytes used by table_slices.
Definition stats.h:524
Statistics for a single query (use ecs_query_cache_stats_get)
Definition stats.h:170
ecs_metric_t result_count
Number of query results.
Definition stats.h:172
int32_t t
Current position in ringbuffer.
Definition stats.h:178
ecs_metric_t matched_table_count
Number of matched tables.
Definition stats.h:173
ecs_metric_t matched_entity_count
Number of matched entities.
Definition stats.h:174
Queries are lists of constraints (terms) that match entities.
Definition flecs.h:817
Statistics for sync point.
Definition stats.h:193
Statistics for a single system (use ecs_system_stats_get())
Definition stats.h:182
bool task
Is system a task.
Definition stats.h:187
ecs_metric_t time_spent
Time spent processing a system.
Definition stats.h:184
Table size histogram.
Definition stats.h:551
Table memory.
Definition stats.h:534
ecs_size_t bytes_dirty_state
Bytes used by column map.
Definition stats.h:546
ecs_size_t bytes_type
Bytes used by ecs_table_t struct.
Definition stats.h:539
ecs_size_t bytes_edges
Bytes used by column map.
Definition stats.h:547
ecs_size_t bytes_table
Number of table columns.
Definition stats.h:538
int32_t column_count
Number of empty tables.
Definition stats.h:537
ecs_size_t bytes_overrides
Bytes used by entity vectors.
Definition stats.h:541
ecs_size_t bytes_columns
Bytes used by table overrides.
Definition stats.h:542
ecs_size_t bytes_table_records
Bytes used by table columns (excluding component data).
Definition stats.h:543
ecs_size_t bytes_component_map
Bytes used by column map.
Definition stats.h:545
int32_t empty_count
Total number of tables.
Definition stats.h:536
ecs_size_t bytes_entities
Bytes used by type vector.
Definition stats.h:540
ecs_size_t bytes_column_map
Bytes used by table records.
Definition stats.h:544
ecs_metric_t alloc_count
Allocs per frame.
Definition stats.h:136
ecs_metric_t block_free_count
Block frees per frame.
Definition stats.h:143
ecs_metric_t system_time
Time spent on running systems.
Definition stats.h:126
ecs_metric_t world_time_raw
Actual time passed since simulation start (first time progress() is called)
Definition stats.h:123
ecs_metric_t delete_count
Number of times id has been deleted.
Definition stats.h:77
ecs_metric_t rematch_count
Number of query rematches.
Definition stats.h:114
ecs_metric_t frame_time
Time spent processing a frame.
Definition stats.h:125
ecs_metric_t tag_count
Number of tag ids (ids without data)
Definition stats.h:72
ecs_metric_t component_count
Number of components ids (ids with data)
Definition stats.h:73
ecs_metric_t system_count
Number of systems.
Definition stats.h:92
ecs_metric_t merge_count
Number of merges executed.
Definition stats.h:113
ecs_metric_t free_count
Frees per frame.
Definition stats.h:138
ecs_metric_t query_count
Number of queries.
Definition stats.h:90
ecs_metric_t world_time
Simulation time passed since simulation start.
Definition stats.h:124
ecs_metric_t realloc_count
Reallocs per frame.
Definition stats.h:137
ecs_metric_t merge_time
Time spent on merging commands.
Definition stats.h:128
ecs_metric_t outstanding_alloc_count
Difference between allocs & frees.
Definition stats.h:139
ecs_metric_t observers_ran
Number of times an observer was invoked.
Definition stats.h:117
ecs_metric_t frame_count
Number of frames processed.
Definition stats.h:112
ecs_metric_t event_emit_count
Number of events emitted.
Definition stats.h:118
ecs_metric_t empty_count
Number of empty tables.
Definition stats.h:83
ecs_metric_t block_outstanding_alloc_count
Difference between allocs & frees.
Definition stats.h:144
int32_t t
Current position in ring buffer.
Definition stats.h:166
ecs_metric_t stack_free_count
Page frees per frame.
Definition stats.h:146
ecs_metric_t rematch_time
Time spent on rematching.
Definition stats.h:129
ecs_metric_t fps
Frames per second.
Definition stats.h:130
ecs_metric_t systems_ran
Number of systems ran.
Definition stats.h:116
ecs_metric_t type_count
Number of registered types.
Definition stats.h:75
ecs_metric_t count
Number of entities.
Definition stats.h:66
ecs_metric_t emit_time
Time spent on notifying observers.
Definition stats.h:127
ecs_metric_t create_count
Number of times id has been created.
Definition stats.h:76
ecs_metric_t not_alive_count
Number of not alive (recyclable) entity ids.
Definition stats.h:67
ecs_metric_t stack_alloc_count
Page allocations per frame.
Definition stats.h:145
ecs_metric_t observer_count
Number of observers.
Definition stats.h:91
ecs_metric_t pipeline_build_count
Number of system pipeline rebuilds (occurs when an inactive system becomes active).
Definition stats.h:115
ecs_metric_t stack_outstanding_alloc_count
Difference between allocs & frees.
Definition stats.h:147
ecs_metric_t block_alloc_count
Block allocations per frame.
Definition stats.h:142
ecs_metric_t delta_time
Delta_time.
Definition stats.h:131
ecs_metric_t pair_count
Number of pair ids.
Definition stats.h:74
Make all metrics the same size, so we can iterate over fields.
Definition stats.h:56