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

| Flecs v4.1 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
41#define ECS_STAT_WINDOW (60)
42
44 typedef struct ecs_gauge_t {
45 ecs_float_t avg[ECS_STAT_WINDOW];
46 ecs_float_t min[ECS_STAT_WINDOW];
47 ecs_float_t max[ECS_STAT_WINDOW];
48} ecs_gauge_t;
49
51 typedef struct ecs_counter_t {
52 ecs_gauge_t rate;
53 double value[ECS_STAT_WINDOW];
54} ecs_counter_t;
55
57 typedef union ecs_metric_t {
58 ecs_gauge_t gauge;
59 ecs_counter_t counter;
60} ecs_metric_t;
61
63 typedef struct ecs_world_stats_t {
64 int64_t first_;
65
66 /* Entities */
67 struct {
68 ecs_metric_t count;
69 ecs_metric_t not_alive_count;
70 } entities;
71
72 /* Component IDs */
73 struct {
74 ecs_metric_t tag_count;
75 ecs_metric_t component_count;
76 ecs_metric_t pair_count;
77 ecs_metric_t type_count;
78 ecs_metric_t create_count;
79 ecs_metric_t delete_count;
80 } components;
81
82 /* Tables */
83 struct {
84 ecs_metric_t count;
85 ecs_metric_t empty_count;
86 ecs_metric_t create_count;
87 ecs_metric_t delete_count;
88 } tables;
89
90 /* Queries and events */
91 struct {
92 ecs_metric_t query_count;
93 ecs_metric_t observer_count;
94 ecs_metric_t system_count;
95 } queries;
96
97 /* Commands */
98 struct {
99 ecs_metric_t add_count;
100 ecs_metric_t remove_count;
101 ecs_metric_t delete_count;
102 ecs_metric_t clear_count;
103 ecs_metric_t set_count;
104 ecs_metric_t ensure_count;
105 ecs_metric_t modified_count;
106 ecs_metric_t other_count;
107 ecs_metric_t discard_count;
108 ecs_metric_t batched_entity_count;
109 ecs_metric_t batched_count;
110 } commands;
111
112 /* Frame data */
113 struct {
114 ecs_metric_t frame_count;
115 ecs_metric_t merge_count;
116 ecs_metric_t rematch_count;
117 ecs_metric_t pipeline_build_count;
118 ecs_metric_t systems_ran;
119 ecs_metric_t observers_ran;
120 ecs_metric_t event_emit_count;
121 } frame;
122
123 /* Timing */
124 struct {
125 ecs_metric_t world_time_raw;
126 ecs_metric_t world_time;
127 ecs_metric_t frame_time;
128 ecs_metric_t system_time;
129 ecs_metric_t emit_time;
130 ecs_metric_t merge_time;
131 ecs_metric_t rematch_time;
132 ecs_metric_t fps;
133 ecs_metric_t delta_time;
134 } performance;
135
136 struct {
137 /* Memory allocation data */
138 ecs_metric_t alloc_count;
139 ecs_metric_t realloc_count;
140 ecs_metric_t free_count;
141 ecs_metric_t outstanding_alloc_count;
142
143 /* Memory allocator data */
144 ecs_metric_t block_alloc_count;
145 ecs_metric_t block_free_count;
146 ecs_metric_t block_outstanding_alloc_count;
147 ecs_metric_t stack_alloc_count;
148 ecs_metric_t stack_free_count;
149 ecs_metric_t stack_outstanding_alloc_count;
150 } memory;
151
152 /* HTTP statistics */
153 struct {
154 ecs_metric_t request_received_count;
155 ecs_metric_t request_invalid_count;
156 ecs_metric_t request_handled_ok_count;
157 ecs_metric_t request_handled_error_count;
158 ecs_metric_t request_not_handled_count;
159 ecs_metric_t request_preflight_count;
160 ecs_metric_t send_ok_count;
161 ecs_metric_t send_error_count;
162 ecs_metric_t busy_count;
163 } http;
164
165 int64_t last_;
166
168 int32_t t;
169} ecs_world_stats_t;
170
172 typedef struct ecs_query_stats_t {
173 int64_t first_;
174 ecs_metric_t result_count;
175 ecs_metric_t matched_table_count;
176 ecs_metric_t matched_entity_count;
177 int64_t last_;
178
180 int32_t t;
181} ecs_query_stats_t;
182
184 typedef struct ecs_system_stats_t {
185 int64_t first_;
186 ecs_metric_t time_spent;
187 int64_t last_;
188
189 bool task;
190
191 ecs_query_stats_t query;
192} ecs_system_stats_t;
193
195 typedef struct ecs_sync_stats_t {
196 int64_t first_;
197 ecs_metric_t time_spent;
198 ecs_metric_t commands_enqueued;
199 int64_t last_;
200
201 int32_t system_count;
202 bool multi_threaded;
203 bool immediate;
204} ecs_sync_stats_t;
205
207 typedef struct ecs_pipeline_stats_t {
208 int8_t canary_;
209
212 ecs_vec_t systems;
213
215 ecs_vec_t sync_points;
216
218 int32_t t;
219
220 int32_t system_count;
221 int32_t active_system_count;
222 int32_t rebuild_count;
223} ecs_pipeline_stats_t;
224
230FLECS_API
231 void ecs_world_stats_get(
232 const ecs_world_t *world,
233 ecs_world_stats_t *stats);
234
236FLECS_API
237 void ecs_world_stats_reduce(
238 ecs_world_stats_t *dst,
239 const ecs_world_stats_t *src);
240
242FLECS_API
243 void ecs_world_stats_reduce_last(
244 ecs_world_stats_t *stats,
245 const ecs_world_stats_t *old,
246 int32_t count);
247
249FLECS_API
250 void ecs_world_stats_repeat_last(
251 ecs_world_stats_t *stats);
252
254FLECS_API
255 void ecs_world_stats_copy_last(
256 ecs_world_stats_t *dst,
257 const ecs_world_stats_t *src);
258
264FLECS_API
265 void ecs_world_stats_log(
266 const ecs_world_t *world,
267 const ecs_world_stats_t *stats);
268
276FLECS_API
277 void ecs_query_stats_get(
278 const ecs_world_t *world,
279 const ecs_query_t *query,
280 ecs_query_stats_t *stats);
281
283FLECS_API
284 void ecs_query_cache_stats_reduce(
285 ecs_query_stats_t *dst,
286 const ecs_query_stats_t *src);
287
289FLECS_API
290 void ecs_query_cache_stats_reduce_last(
291 ecs_query_stats_t *stats,
292 const ecs_query_stats_t *old,
293 int32_t count);
294
296FLECS_API
297 void ecs_query_cache_stats_repeat_last(
298 ecs_query_stats_t *stats);
299
301FLECS_API
302 void ecs_query_cache_stats_copy_last(
303 ecs_query_stats_t *dst,
304 const ecs_query_stats_t *src);
305
314FLECS_API
315 bool ecs_system_stats_get(
316 const ecs_world_t *world,
317 ecs_entity_t system,
318 ecs_system_stats_t *stats);
319
321FLECS_API
322 void ecs_system_stats_reduce(
323 ecs_system_stats_t *dst,
324 const ecs_system_stats_t *src);
325
327FLECS_API
328 void ecs_system_stats_reduce_last(
329 ecs_system_stats_t *stats,
330 const ecs_system_stats_t *old,
331 int32_t count);
332
334FLECS_API
335 void ecs_system_stats_repeat_last(
336 ecs_system_stats_t *stats);
337
339FLECS_API
340 void ecs_system_stats_copy_last(
341 ecs_system_stats_t *dst,
342 const ecs_system_stats_t *src);
343
352FLECS_API
353 bool ecs_pipeline_stats_get(
354 ecs_world_t *world,
355 ecs_entity_t pipeline,
356 ecs_pipeline_stats_t *stats);
357
362FLECS_API
363 void ecs_pipeline_stats_fini(
364 ecs_pipeline_stats_t *stats);
365
367FLECS_API
368 void ecs_pipeline_stats_reduce(
369 ecs_pipeline_stats_t *dst,
370 const ecs_pipeline_stats_t *src);
371
373FLECS_API
374 void ecs_pipeline_stats_reduce_last(
375 ecs_pipeline_stats_t *stats,
376 const ecs_pipeline_stats_t *old,
377 int32_t count);
378
380FLECS_API
381 void ecs_pipeline_stats_repeat_last(
382 ecs_pipeline_stats_t *stats);
383
391FLECS_API
392 void ecs_pipeline_stats_copy_last(
393 ecs_pipeline_stats_t *dst,
394 const ecs_pipeline_stats_t *src);
395
397FLECS_API
398 void ecs_metric_reduce(
399 ecs_metric_t *dst,
400 const ecs_metric_t *src,
401 int32_t t_dst,
402 int32_t t_src);
403
405FLECS_API
406 void ecs_metric_reduce_last(
407 ecs_metric_t *m,
408 int32_t t,
409 int32_t count);
410
412FLECS_API
413 void ecs_metric_copy(
414 ecs_metric_t *m,
415 int32_t dst,
416 int32_t src);
417
418FLECS_API extern ECS_COMPONENT_DECLARE(FlecsStats);
419FLECS_API extern ECS_COMPONENT_DECLARE(EcsWorldStats);
420FLECS_API extern ECS_COMPONENT_DECLARE(EcsWorldSummary);
421FLECS_API extern ECS_COMPONENT_DECLARE(EcsSystemStats);
422FLECS_API extern ECS_COMPONENT_DECLARE(EcsPipelineStats);
423
424/* Memory statistics components */
425FLECS_API extern ECS_COMPONENT_DECLARE(ecs_entities_memory_t);
426FLECS_API extern ECS_COMPONENT_DECLARE(ecs_component_index_memory_t);
427FLECS_API extern ECS_COMPONENT_DECLARE(ecs_query_memory_t);
428FLECS_API extern ECS_COMPONENT_DECLARE(ecs_component_memory_t);
429FLECS_API extern ECS_COMPONENT_DECLARE(ecs_table_memory_t);
430FLECS_API extern ECS_COMPONENT_DECLARE(ecs_misc_memory_t);
431FLECS_API extern ECS_COMPONENT_DECLARE(ecs_table_histogram_t);
432FLECS_API extern ECS_COMPONENT_DECLARE(ecs_allocator_memory_t);
433FLECS_API extern ECS_COMPONENT_DECLARE(EcsWorldMemory);
434
435FLECS_API extern ecs_entity_t EcsPeriod1s;
436FLECS_API extern ecs_entity_t EcsPeriod1m;
437FLECS_API extern ecs_entity_t EcsPeriod1h;
438FLECS_API extern ecs_entity_t EcsPeriod1d;
439FLECS_API extern ecs_entity_t EcsPeriod1w;
440
442 typedef struct {
443 ecs_ftime_t elapsed;
444 int32_t reduce_count;
445} EcsStatsHeader;
446
448 typedef struct {
449 EcsStatsHeader hdr;
450 ecs_world_stats_t *stats;
451} EcsWorldStats;
452
454 typedef struct {
455 EcsStatsHeader hdr;
456 ecs_map_t stats;
457} EcsSystemStats;
458
460 typedef struct {
461 EcsStatsHeader hdr;
462 ecs_map_t stats;
463} EcsPipelineStats;
464
466 typedef struct {
467 /* Time */
468 double target_fps;
469 double time_scale;
470 double fps;
471
472 /* Totals */
473 double frame_time_total;
474 double system_time_total;
475 double merge_time_total;
476
477 int64_t entity_count;
478 int64_t table_count;
479 int64_t frame_count;
480 int64_t command_count;
481 int64_t merge_count;
482
483 int64_t systems_ran_total;
484 int64_t observers_ran_total;
485 int64_t queries_ran_total;
486
487 int32_t tag_count;
488 int32_t component_count;
489 int32_t pair_count;
490
491 /* Per frame */
492 double frame_time_frame;
493 double system_time_frame;
494 double merge_time_frame;
495
496 int64_t merge_count_frame;
497 int64_t systems_ran_frame;
498 int64_t observers_ran_frame;
499 int64_t queries_ran_frame;
500 int64_t command_count_frame;
501
502 double simulation_time;
503 uint32_t uptime;
504
505 /* Build info */
506 ecs_build_info_t build_info;
507} EcsWorldSummary;
508
510 typedef struct {
511 int32_t alive_count;
512 int32_t not_alive_count;
513 ecs_size_t bytes_entity_index;
514 ecs_size_t bytes_names;
515 ecs_size_t bytes_doc_strings;
516} ecs_entities_memory_t;
517
519 typedef struct {
520 int32_t instances;
521 ecs_size_t bytes_table_components;
522 ecs_size_t bytes_table_components_unused;
523 ecs_size_t bytes_toggle_bitsets;
524 ecs_size_t bytes_sparse_components;
525} ecs_component_memory_t;
526
528 typedef struct {
529 int32_t count;
530 ecs_size_t bytes_component_record;
531 ecs_size_t bytes_table_cache;
532 ecs_size_t bytes_name_index;
533 ecs_size_t bytes_ordered_children;
534 ecs_size_t bytes_children_table_map;
535 ecs_size_t bytes_reachable_cache;
536} ecs_component_index_memory_t;
537
539 typedef struct {
540 int32_t count;
541 int32_t cached_count;
542 ecs_size_t bytes_query;
543 ecs_size_t bytes_cache;
544 ecs_size_t bytes_group_by;
545 ecs_size_t bytes_order_by;
546 ecs_size_t bytes_plan;
547 ecs_size_t bytes_terms;
548 ecs_size_t bytes_misc;
549} ecs_query_memory_t;
550
552#define ECS_TABLE_MEMORY_HISTOGRAM_BUCKET_COUNT 14
553#define ECS_TABLE_MEMORY_HISTOGRAM_MAX_COUNT (1 << ECS_TABLE_MEMORY_HISTOGRAM_BUCKET_COUNT)
554
556 typedef struct {
557 int32_t count;
558 int32_t empty_count;
559 int32_t column_count;
560 ecs_size_t bytes_table;
561 ecs_size_t bytes_type;
562 ecs_size_t bytes_entities;
563 ecs_size_t bytes_overrides;
564 ecs_size_t bytes_column_map;
565 ecs_size_t bytes_component_map;
566 ecs_size_t bytes_dirty_state;
567 ecs_size_t bytes_edges;
568} ecs_table_memory_t;
569
571 typedef struct {
572 int32_t entity_counts[ECS_TABLE_MEMORY_HISTOGRAM_BUCKET_COUNT];
573} ecs_table_histogram_t;
574
576 typedef struct {
577 ecs_size_t bytes_world;
578 ecs_size_t bytes_observers;
579 ecs_size_t bytes_systems;
580 ecs_size_t bytes_pipelines;
581 ecs_size_t bytes_table_lookup;
582 ecs_size_t bytes_component_record_lookup;
583 ecs_size_t bytes_locked_components;
584 ecs_size_t bytes_type_info;
585 ecs_size_t bytes_commands;
586 ecs_size_t bytes_rematch_monitor;
587 ecs_size_t bytes_component_ids;
588 ecs_size_t bytes_reflection;
589 ecs_size_t bytes_tree_spawner;
590 ecs_size_t bytes_prefab_child_indices;
591 ecs_size_t bytes_stats;
592 ecs_size_t bytes_rest;
593} ecs_misc_memory_t;
594
597 typedef struct {
598 ecs_size_t bytes_graph_edge;
599 ecs_size_t bytes_component_record;
600 ecs_size_t bytes_pair_record;
601 ecs_size_t bytes_table_diff;
602 ecs_size_t bytes_sparse_chunk;
603 ecs_size_t bytes_allocator;
604 ecs_size_t bytes_stack_allocator;
605 ecs_size_t bytes_cmd_entry_chunk;
606 ecs_size_t bytes_query_impl;
607 ecs_size_t bytes_query_cache;
608 ecs_size_t bytes_misc;
609} ecs_allocator_memory_t;
610
612 typedef struct {
613 ecs_entities_memory_t entities;
614 ecs_component_memory_t components;
615 ecs_component_index_memory_t component_index;
616 ecs_query_memory_t queries;
617 ecs_table_memory_t tables;
618 ecs_table_histogram_t table_histogram;
619 ecs_misc_memory_t misc;
620 ecs_allocator_memory_t allocators;
621 double collection_time;
622} EcsWorldMemory;
623
629FLECS_API
630 ecs_entities_memory_t ecs_entity_memory_get(
631 const ecs_world_t *world);
632
638 void ecs_component_record_memory_get(
639 const ecs_component_record_t *cr,
640 ecs_component_index_memory_t *result);
641
647FLECS_API
648 ecs_component_index_memory_t ecs_component_index_memory_get(
649 const ecs_world_t *world);
650
656FLECS_API
657 void ecs_query_memory_get(
658 const ecs_query_t *query,
659 ecs_query_memory_t *result);
660
666FLECS_API
667 ecs_query_memory_t ecs_queries_memory_get(
668 const ecs_world_t *world);
669
675 void ecs_table_component_memory_get(
676 const ecs_table_t *table,
677 ecs_component_memory_t *result);
678
684FLECS_API
685 ecs_component_memory_t ecs_component_memory_get(
686 const ecs_world_t *world);
687
693 void ecs_table_memory_get(
694 const ecs_table_t *table,
695 ecs_table_memory_t *result);
696
702FLECS_API
703 ecs_table_memory_t ecs_tables_memory_get(
704 const ecs_world_t *world);
705
711FLECS_API
712 ecs_table_histogram_t ecs_table_histogram_get(
713 const ecs_world_t *world);
714
720FLECS_API
721 ecs_misc_memory_t ecs_misc_memory_get(
722 const ecs_world_t *world);
723
729FLECS_API
730 ecs_allocator_memory_t ecs_allocator_memory_get(
731 const ecs_world_t *world);
732
738FLECS_API
739ecs_size_t ecs_memory_get(
740 const ecs_world_t *world);
741
742
751FLECS_API
752 void FlecsStatsImport(
753 ecs_world_t *world);
754
755#ifdef __cplusplus
756}
757#endif
758
759#endif
760
762
763#endif
ecs_memory_get
FLECS_API ecs_size_t ecs_memory_get(const ecs_world_t *world)
Get total memory used by world.
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.
ECS_STAT_WINDOW
#define ECS_STAT_WINDOW
Number of samples in the stat window.
Definition stats.h:41
ecs_queries_memory_get
FLECS_API ecs_query_memory_t ecs_queries_memory_get(const ecs_world_t *world)
Get memory usage statistics for queries.
ECS_TABLE_MEMORY_HISTOGRAM_BUCKET_COUNT
#define ECS_TABLE_MEMORY_HISTOGRAM_BUCKET_COUNT
Table memory histogram constants.
Definition stats.h:552
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_component_memory_get
FLECS_API ecs_component_memory_t ecs_component_memory_get(const ecs_world_t *world)
Get memory usage statistics for components.
ecs_misc_memory_get
FLECS_API ecs_misc_memory_t ecs_misc_memory_get(const ecs_world_t *world)
Get memory usage statistics for miscellaneous allocations.
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_allocator_memory_get
FLECS_API ecs_allocator_memory_t ecs_allocator_memory_get(const ecs_world_t *world)
Get memory usage statistics for allocators.
ecs_table_histogram_get
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.
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.
ecs_query_memory_get
FLECS_API void ecs_query_memory_get(const ecs_query_t *query, ecs_query_memory_t *result)
Get memory usage statistics for single query.
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_entity_memory_get
FLECS_API ecs_entities_memory_t ecs_entity_memory_get(const ecs_world_t *world)
Get memory usage statistics for the entity index.
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_tables_memory_get
FLECS_API ecs_table_memory_t ecs_tables_memory_get(const ecs_world_t *world)
Get memory usage statistics for tables.
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_table_component_memory_get
void ecs_table_component_memory_get(const ecs_table_t *table, ecs_component_memory_t *result)
Get component memory for table.
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_component_record_memory_get
void ecs_component_record_memory_get(const ecs_component_record_t *cr, ecs_component_index_memory_t *result)
Get memory usage statistics for single component record.
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.
ecs_world_stats_log
FLECS_API void ecs_world_stats_log(const ecs_world_t *world, const ecs_world_stats_t *stats)
Log world statistics.
EcsPeriod1d
FLECS_API ecs_entity_t EcsPeriod1d
Tag used for metrics collected in last day.
ecs_table_memory_get
void ecs_table_memory_get(const ecs_table_t *table, ecs_table_memory_t *result)
Get memory usage statistics for single table.
ecs_component_index_memory_get
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.
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_component_record_t
struct ecs_component_record_t ecs_component_record_t
Information about a (component) ID, such as type info and tables with the ID.
Definition flecs.h:497
ecs_entity_t
ecs_id_t ecs_entity_t
An entity identifier.
Definition flecs.h:385
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:429
ecs_table_t
struct ecs_table_t ecs_table_t
A table stores entities and components for a specific type.
Definition flecs.h:435
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:460
EcsPipelineStats::hdr
EcsStatsHeader hdr
Statistics header.
Definition stats.h:461
EcsPipelineStats::stats
ecs_map_t stats
Map of pipeline statistics.
Definition stats.h:462
EcsStatsHeader
Common header for statistics types.
Definition stats.h:442
EcsStatsHeader::reduce_count
int32_t reduce_count
Number of times statistics have been reduced.
Definition stats.h:444
EcsStatsHeader::elapsed
ecs_ftime_t elapsed
Elapsed time since last reset.
Definition stats.h:443
EcsSystemStats
Component that stores system statistics.
Definition stats.h:454
EcsSystemStats::stats
ecs_map_t stats
Map of system statistics.
Definition stats.h:456
EcsSystemStats::hdr
EcsStatsHeader hdr
Statistics header.
Definition stats.h:455
EcsWorldMemory
Component with memory statistics.
Definition stats.h:612
EcsWorldMemory::entities
ecs_entities_memory_t entities
Entity memory.
Definition stats.h:613
EcsWorldMemory::queries
ecs_query_memory_t queries
Query memory.
Definition stats.h:616
EcsWorldMemory::tables
ecs_table_memory_t tables
Table memory.
Definition stats.h:617
EcsWorldMemory::table_histogram
ecs_table_histogram_t table_histogram
Table size histogram.
Definition stats.h:618
EcsWorldMemory::misc
ecs_misc_memory_t misc
Miscellaneous memory.
Definition stats.h:619
EcsWorldMemory::collection_time
double collection_time
Time spent collecting statistics.
Definition stats.h:621
EcsWorldMemory::allocators
ecs_allocator_memory_t allocators
Allocator memory.
Definition stats.h:620
EcsWorldMemory::components
ecs_component_memory_t components
Component memory.
Definition stats.h:614
EcsWorldMemory::component_index
ecs_component_index_memory_t component_index
Component index memory.
Definition stats.h:615
EcsWorldStats
Component that stores world statistics.
Definition stats.h:448
EcsWorldStats::stats
ecs_world_stats_t * stats
World statistics data.
Definition stats.h:450
EcsWorldStats::hdr
EcsStatsHeader hdr
Statistics header.
Definition stats.h:449
EcsWorldSummary
Component that stores a summary of world statistics.
Definition stats.h:466
EcsWorldSummary::component_count
int32_t component_count
Number of component (data) IDs in the world.
Definition stats.h:488
EcsWorldSummary::systems_ran_frame
int64_t systems_ran_frame
Number of systems run in last frame.
Definition stats.h:497
EcsWorldSummary::queries_ran_total
int64_t queries_ran_total
Total number of queries run.
Definition stats.h:485
EcsWorldSummary::frame_time_frame
double frame_time_frame
Time spent processing a frame.
Definition stats.h:492
EcsWorldSummary::simulation_time
double simulation_time
Time spent in simulation.
Definition stats.h:502
EcsWorldSummary::entity_count
int64_t entity_count
Number of entities.
Definition stats.h:477
EcsWorldSummary::target_fps
double target_fps
Target FPS.
Definition stats.h:468
EcsWorldSummary::merge_time_total
double merge_time_total
Total time spent in merges.
Definition stats.h:475
EcsWorldSummary::system_time_frame
double system_time_frame
Time spent in systems.
Definition stats.h:493
EcsWorldSummary::table_count
int64_t table_count
Number of tables.
Definition stats.h:478
EcsWorldSummary::observers_ran_total
int64_t observers_ran_total
Total number of times observers were invoked.
Definition stats.h:484
EcsWorldSummary::systems_ran_total
int64_t systems_ran_total
Total number of systems run.
Definition stats.h:483
EcsWorldSummary::frame_count
int64_t frame_count
Number of frames processed.
Definition stats.h:479
EcsWorldSummary::queries_ran_frame
int64_t queries_ran_frame
Number of queries run in last frame.
Definition stats.h:499
EcsWorldSummary::pair_count
int32_t pair_count
Number of pair IDs in the world.
Definition stats.h:489
EcsWorldSummary::build_info
ecs_build_info_t build_info
Build info.
Definition stats.h:506
EcsWorldSummary::merge_count
int64_t merge_count
Number of merges executed.
Definition stats.h:481
EcsWorldSummary::command_count_frame
int64_t command_count_frame
Number of commands processed in last frame.
Definition stats.h:500
EcsWorldSummary::system_time_total
double system_time_total
Total time spent in systems.
Definition stats.h:474
EcsWorldSummary::uptime
uint32_t uptime
Time since world was created.
Definition stats.h:503
EcsWorldSummary::merge_time_frame
double merge_time_frame
Time spent in merges.
Definition stats.h:494
EcsWorldSummary::frame_time_total
double frame_time_total
Total time spent processing a frame.
Definition stats.h:473
EcsWorldSummary::merge_count_frame
int64_t merge_count_frame
Number of merges in last frame.
Definition stats.h:496
EcsWorldSummary::tag_count
int32_t tag_count
Number of tag (no data) IDs in the world.
Definition stats.h:487
EcsWorldSummary::time_scale
double time_scale
Simulation time scale.
Definition stats.h:469
EcsWorldSummary::fps
double fps
FPS.
Definition stats.h:470
EcsWorldSummary::command_count
int64_t command_count
Number of commands processed.
Definition stats.h:480
EcsWorldSummary::observers_ran_frame
int64_t observers_ran_frame
Number of times observers were invoked in last frame.
Definition stats.h:498
ecs_allocator_memory_t
Allocator memory.
Definition stats.h:597
ecs_allocator_memory_t::bytes_sparse_chunk
ecs_size_t bytes_sparse_chunk
Sparse chunk allocator.
Definition stats.h:602
ecs_allocator_memory_t::bytes_table_diff
ecs_size_t bytes_table_diff
Table diff allocator.
Definition stats.h:601
ecs_allocator_memory_t::bytes_graph_edge
ecs_size_t bytes_graph_edge
Graph edge allocator.
Definition stats.h:598
ecs_allocator_memory_t::bytes_query_impl
ecs_size_t bytes_query_impl
Query struct allocator.
Definition stats.h:606
ecs_allocator_memory_t::bytes_allocator
ecs_size_t bytes_allocator
Generic allocator.
Definition stats.h:603
ecs_allocator_memory_t::bytes_stack_allocator
ecs_size_t bytes_stack_allocator
Stack allocator.
Definition stats.h:604
ecs_allocator_memory_t::bytes_cmd_entry_chunk
ecs_size_t bytes_cmd_entry_chunk
Command batching entry chunk allocator.
Definition stats.h:605
ecs_allocator_memory_t::bytes_misc
ecs_size_t bytes_misc
Miscellaneous allocators.
Definition stats.h:608
ecs_allocator_memory_t::bytes_pair_record
ecs_size_t bytes_pair_record
Pair record allocator.
Definition stats.h:600
ecs_allocator_memory_t::bytes_query_cache
ecs_size_t bytes_query_cache
Query cache struct allocator.
Definition stats.h:607
ecs_allocator_memory_t::bytes_component_record
ecs_size_t bytes_component_record
Component record allocator.
Definition stats.h:599
ecs_build_info_t
Type with information about the current Flecs build.
Definition flecs.h:1490
ecs_component_index_memory_t
Component index memory.
Definition stats.h:528
ecs_component_index_memory_t::bytes_children_table_map
ecs_size_t bytes_children_table_map
Bytes used by map for non-fragmenting ChildOf table lookups.
Definition stats.h:534
ecs_component_index_memory_t::count
int32_t count
Number of component records.
Definition stats.h:529
ecs_component_index_memory_t::bytes_component_record
ecs_size_t bytes_component_record
Bytes used by ecs_component_record_t struct.
Definition stats.h:530
ecs_component_index_memory_t::bytes_ordered_children
ecs_size_t bytes_ordered_children
Bytes used by ordered children vector.
Definition stats.h:533
ecs_component_index_memory_t::bytes_table_cache
ecs_size_t bytes_table_cache
Bytes used by table cache.
Definition stats.h:531
ecs_component_index_memory_t::bytes_name_index
ecs_size_t bytes_name_index
Bytes used by name index.
Definition stats.h:532
ecs_component_index_memory_t::bytes_reachable_cache
ecs_size_t bytes_reachable_cache
Bytes used by reachable cache.
Definition stats.h:535
ecs_component_memory_t
Component memory.
Definition stats.h:519
ecs_component_memory_t::bytes_sparse_components
ecs_size_t bytes_sparse_components
Bytes used in component sparse sets.
Definition stats.h:524
ecs_component_memory_t::instances
int32_t instances
Total number of component instances.
Definition stats.h:520
ecs_component_memory_t::bytes_table_components_unused
ecs_size_t bytes_table_components_unused
Unused bytes in table columns.
Definition stats.h:522
ecs_component_memory_t::bytes_table_components
ecs_size_t bytes_table_components
Bytes used by table columns.
Definition stats.h:521
ecs_component_memory_t::bytes_toggle_bitsets
ecs_size_t bytes_toggle_bitsets
Bytes used in bitsets (toggled components).
Definition stats.h:523
ecs_counter_t
Monotonically increasing counter.
Definition stats.h:51
ecs_counter_t::rate
ecs_gauge_t rate
Keep track of deltas too.
Definition stats.h:52
ecs_counter_t::value
double value[(60)]
Monotonically increasing values.
Definition stats.h:53
ecs_entities_memory_t
Entity memory.
Definition stats.h:510
ecs_entities_memory_t::alive_count
int32_t alive_count
Number of alive entities.
Definition stats.h:511
ecs_entities_memory_t::not_alive_count
int32_t not_alive_count
Number of not alive entities.
Definition stats.h:512
ecs_entities_memory_t::bytes_doc_strings
ecs_size_t bytes_doc_strings
Bytes used by doc strings.
Definition stats.h:515
ecs_entities_memory_t::bytes_entity_index
ecs_size_t bytes_entity_index
Bytes used by entity index.
Definition stats.h:513
ecs_entities_memory_t::bytes_names
ecs_size_t bytes_names
Bytes used by names, symbols, and aliases.
Definition stats.h:514
ecs_gauge_t
Simple value that indicates current state.
Definition stats.h:44
ecs_gauge_t::avg
ecs_float_t avg[(60)]
Windowed average.
Definition stats.h:45
ecs_gauge_t::min
ecs_float_t min[(60)]
Windowed minimum.
Definition stats.h:46
ecs_gauge_t::max
ecs_float_t max[(60)]
Windowed maximum.
Definition stats.h:47
ecs_misc_memory_t
Misc memory.
Definition stats.h:576
ecs_misc_memory_t::bytes_component_ids
ecs_size_t bytes_component_ids
Memory used for mapping global to world-local component ids.
Definition stats.h:587
ecs_misc_memory_t::bytes_observers
ecs_size_t bytes_observers
Memory used by observers.
Definition stats.h:578
ecs_misc_memory_t::bytes_type_info
ecs_size_t bytes_type_info
Bytes used for storing type information.
Definition stats.h:584
ecs_misc_memory_t::bytes_reflection
ecs_size_t bytes_reflection
Memory used for component reflection not tracked elsewhere.
Definition stats.h:588
ecs_misc_memory_t::bytes_stats
ecs_size_t bytes_stats
Memory used for statistics tracking not tracked elsewhere.
Definition stats.h:591
ecs_misc_memory_t::bytes_prefab_child_indices
ecs_size_t bytes_prefab_child_indices
Memory used by map that stores indices for ordered prefab children.
Definition stats.h:590
ecs_misc_memory_t::bytes_systems
ecs_size_t bytes_systems
Memory used by systems (excluding system queries).
Definition stats.h:579
ecs_misc_memory_t::bytes_locked_components
ecs_size_t bytes_locked_components
Locked component map.
Definition stats.h:583
ecs_misc_memory_t::bytes_pipelines
ecs_size_t bytes_pipelines
Memory used by pipelines (excluding pipeline queries).
Definition stats.h:580
ecs_misc_memory_t::bytes_world
ecs_size_t bytes_world
Memory used by world and stages.
Definition stats.h:577
ecs_misc_memory_t::bytes_rematch_monitor
ecs_size_t bytes_rematch_monitor
Memory used by monitor used to track rematches.
Definition stats.h:586
ecs_misc_memory_t::bytes_rest
ecs_size_t bytes_rest
Memory used by REST HTTP server.
Definition stats.h:592
ecs_misc_memory_t::bytes_commands
ecs_size_t bytes_commands
Command queue.
Definition stats.h:585
ecs_misc_memory_t::bytes_component_record_lookup
ecs_size_t bytes_component_record_lookup
Bytes used for component record lookup data structures.
Definition stats.h:582
ecs_misc_memory_t::bytes_tree_spawner
ecs_size_t bytes_tree_spawner
Memory used for tree (prefab) spawners.
Definition stats.h:589
ecs_misc_memory_t::bytes_table_lookup
ecs_size_t bytes_table_lookup
Bytes used for table lookup data structures.
Definition stats.h:581
ecs_pipeline_stats_t
Statistics for all systems in a pipeline.
Definition stats.h:207
ecs_pipeline_stats_t::rebuild_count
int32_t rebuild_count
Number of times pipeline has rebuilt.
Definition stats.h:222
ecs_pipeline_stats_t::system_count
int32_t system_count
Number of systems in pipeline.
Definition stats.h:220
ecs_pipeline_stats_t::canary_
int8_t canary_
Allow for initializing struct with {0}.
Definition stats.h:208
ecs_pipeline_stats_t::systems
ecs_vec_t systems
Vector with system IDs of all systems in the pipeline.
Definition stats.h:212
ecs_pipeline_stats_t::active_system_count
int32_t active_system_count
Number of active systems in pipeline.
Definition stats.h:221
ecs_pipeline_stats_t::sync_points
ecs_vec_t sync_points
Vector with sync point stats.
Definition stats.h:215
ecs_pipeline_stats_t::t
int32_t t
Current position in ring buffer.
Definition stats.h:218
ecs_query_memory_t
Query memory.
Definition stats.h:539
ecs_query_memory_t::bytes_cache
ecs_size_t bytes_cache
Bytes used by query cache.
Definition stats.h:543
ecs_query_memory_t::bytes_terms
ecs_size_t bytes_terms
Bytes used by terms array.
Definition stats.h:547
ecs_query_memory_t::count
int32_t count
Number of queries.
Definition stats.h:540
ecs_query_memory_t::bytes_order_by
ecs_size_t bytes_order_by
Bytes used by table_slices.
Definition stats.h:545
ecs_query_memory_t::cached_count
int32_t cached_count
Number of queries with caches.
Definition stats.h:541
ecs_query_memory_t::bytes_query
ecs_size_t bytes_query
Bytes used by ecs_query_impl_t struct.
Definition stats.h:542
ecs_query_memory_t::bytes_misc
ecs_size_t bytes_misc
Bytes used by remaining misc arrays.
Definition stats.h:548
ecs_query_memory_t::bytes_group_by
ecs_size_t bytes_group_by
Bytes used by query cache groups (excludes cache elements).
Definition stats.h:544
ecs_query_memory_t::bytes_plan
ecs_size_t bytes_plan
Bytes used by query plan.
Definition stats.h:546
ecs_query_stats_t
Statistics for a single query (use ecs_query_cache_stats_get()).
Definition stats.h:172
ecs_query_stats_t::result_count
ecs_metric_t result_count
Number of query results.
Definition stats.h:174
ecs_query_stats_t::t
int32_t t
Current position in ring buffer.
Definition stats.h:180
ecs_query_stats_t::matched_table_count
ecs_metric_t matched_table_count
Number of matched tables.
Definition stats.h:175
ecs_query_stats_t::matched_entity_count
ecs_metric_t matched_entity_count
Number of matched entities.
Definition stats.h:176
ecs_query_stats_t::first_
int64_t first_
Used for field iteration.
Definition stats.h:173
ecs_query_stats_t::last_
int64_t last_
Used for field iteration.
Definition stats.h:177
ecs_query_t
Queries are lists of constraints (terms) that match entities.
Definition flecs.h:838
ecs_sync_stats_t
Statistics for sync point.
Definition stats.h:195
ecs_sync_stats_t::time_spent
ecs_metric_t time_spent
Time spent in sync point.
Definition stats.h:197
ecs_sync_stats_t::first_
int64_t first_
Used for field iteration.
Definition stats.h:196
ecs_sync_stats_t::last_
int64_t last_
Used for field iteration.
Definition stats.h:199
ecs_sync_stats_t::system_count
int32_t system_count
Number of systems before sync point.
Definition stats.h:201
ecs_sync_stats_t::immediate
bool immediate
Whether the sync point is immediate.
Definition stats.h:203
ecs_sync_stats_t::commands_enqueued
ecs_metric_t commands_enqueued
Number of commands enqueued.
Definition stats.h:198
ecs_sync_stats_t::multi_threaded
bool multi_threaded
Whether the sync point is multi-threaded.
Definition stats.h:202
ecs_system_stats_t
Statistics for a single system (use ecs_system_stats_get()).
Definition stats.h:184
ecs_system_stats_t::last_
int64_t last_
Used for field iteration.
Definition stats.h:187
ecs_system_stats_t::first_
int64_t first_
Used for field iteration.
Definition stats.h:185
ecs_system_stats_t::query
ecs_query_stats_t query
Query statistics.
Definition stats.h:191
ecs_system_stats_t::task
bool task
Whether the system is a task.
Definition stats.h:189
ecs_system_stats_t::time_spent
ecs_metric_t time_spent
Time spent processing a system.
Definition stats.h:186
ecs_table_histogram_t
Table size histogram.
Definition stats.h:571
ecs_table_histogram_t::entity_counts
int32_t entity_counts[14]
Entity count histogram buckets.
Definition stats.h:572
ecs_table_memory_t
Table memory.
Definition stats.h:556
ecs_table_memory_t::bytes_dirty_state
ecs_size_t bytes_dirty_state
Bytes used by dirty state.
Definition stats.h:566
ecs_table_memory_t::bytes_type
ecs_size_t bytes_type
Bytes used by type, columns, and table records.
Definition stats.h:561
ecs_table_memory_t::bytes_edges
ecs_size_t bytes_edges
Bytes used by table graph edges.
Definition stats.h:567
ecs_table_memory_t::bytes_table
ecs_size_t bytes_table
Bytes used by ecs_table_t struct.
Definition stats.h:560
ecs_table_memory_t::count
int32_t count
Total number of tables.
Definition stats.h:557
ecs_table_memory_t::column_count
int32_t column_count
Number of table columns.
Definition stats.h:559
ecs_table_memory_t::bytes_overrides
ecs_size_t bytes_overrides
Bytes used by table overrides.
Definition stats.h:563
ecs_table_memory_t::bytes_component_map
ecs_size_t bytes_component_map
Bytes used by component map.
Definition stats.h:565
ecs_table_memory_t::empty_count
int32_t empty_count
Number of empty tables.
Definition stats.h:558
ecs_table_memory_t::bytes_entities
ecs_size_t bytes_entities
Bytes used by entity vectors.
Definition stats.h:562
ecs_table_memory_t::bytes_column_map
ecs_size_t bytes_column_map
Bytes used by column map.
Definition stats.h:564
ecs_world_stats_t
Type that contains world statistics.
Definition stats.h:63
ecs_world_stats_t::alloc_count
ecs_metric_t alloc_count
Allocs per frame.
Definition stats.h:138
ecs_world_stats_t::block_free_count
ecs_metric_t block_free_count
Block frees per frame.
Definition stats.h:145
ecs_world_stats_t::batched_count
ecs_metric_t batched_count
Number of commands batched.
Definition stats.h:109
ecs_world_stats_t::system_time
ecs_metric_t system_time
Time spent on running systems.
Definition stats.h:128
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:125
ecs_world_stats_t::delete_count
ecs_metric_t delete_count
Number of times an ID has been deleted.
Definition stats.h:79
ecs_world_stats_t::busy_count
ecs_metric_t busy_count
Number of times server was busy.
Definition stats.h:162
ecs_world_stats_t::rematch_count
ecs_metric_t rematch_count
Number of query rematches.
Definition stats.h:116
ecs_world_stats_t::frame_time
ecs_metric_t frame_time
Time spent processing a frame.
Definition stats.h:127
ecs_world_stats_t::tag_count
ecs_metric_t tag_count
Number of tag IDs (IDs without data).
Definition stats.h:74
ecs_world_stats_t::component_count
ecs_metric_t component_count
Number of component IDs (IDs with data).
Definition stats.h:75
ecs_world_stats_t::system_count
ecs_metric_t system_count
Number of systems.
Definition stats.h:94
ecs_world_stats_t::merge_count
ecs_metric_t merge_count
Number of merges executed.
Definition stats.h:115
ecs_world_stats_t::free_count
ecs_metric_t free_count
Frees per frame.
Definition stats.h:140
ecs_world_stats_t::query_count
ecs_metric_t query_count
Number of queries.
Definition stats.h:92
ecs_world_stats_t::request_received_count
ecs_metric_t request_received_count
Number of HTTP requests received.
Definition stats.h:154
ecs_world_stats_t::world_time
ecs_metric_t world_time
Simulation time passed since simulation start.
Definition stats.h:126
ecs_world_stats_t::realloc_count
ecs_metric_t realloc_count
Reallocs per frame.
Definition stats.h:139
ecs_world_stats_t::merge_time
ecs_metric_t merge_time
Time spent on merging commands.
Definition stats.h:130
ecs_world_stats_t::modified_count
ecs_metric_t modified_count
Number of modified commands.
Definition stats.h:105
ecs_world_stats_t::set_count
ecs_metric_t set_count
Number of set commands.
Definition stats.h:103
ecs_world_stats_t::outstanding_alloc_count
ecs_metric_t outstanding_alloc_count
Difference between allocs and frees.
Definition stats.h:141
ecs_world_stats_t::observers_ran
ecs_metric_t observers_ran
Number of times an observer was invoked.
Definition stats.h:119
ecs_world_stats_t::frame_count
ecs_metric_t frame_count
Number of frames processed.
Definition stats.h:114
ecs_world_stats_t::remove_count
ecs_metric_t remove_count
Number of remove commands.
Definition stats.h:100
ecs_world_stats_t::send_ok_count
ecs_metric_t send_ok_count
Number of successful HTTP responses sent.
Definition stats.h:160
ecs_world_stats_t::event_emit_count
ecs_metric_t event_emit_count
Number of events emitted.
Definition stats.h:120
ecs_world_stats_t::discard_count
ecs_metric_t discard_count
Number of discarded commands.
Definition stats.h:107
ecs_world_stats_t::empty_count
ecs_metric_t empty_count
Number of empty tables.
Definition stats.h:85
ecs_world_stats_t::block_outstanding_alloc_count
ecs_metric_t block_outstanding_alloc_count
Difference between allocs and frees.
Definition stats.h:146
ecs_world_stats_t::t
int32_t t
Current position in ring buffer.
Definition stats.h:168
ecs_world_stats_t::stack_free_count
ecs_metric_t stack_free_count
Page frees per frame.
Definition stats.h:148
ecs_world_stats_t::request_handled_error_count
ecs_metric_t request_handled_error_count
Number of HTTP requests with error response.
Definition stats.h:157
ecs_world_stats_t::send_error_count
ecs_metric_t send_error_count
Number of HTTP responses with send error.
Definition stats.h:161
ecs_world_stats_t::rematch_time
ecs_metric_t rematch_time
Time spent on rematching.
Definition stats.h:131
ecs_world_stats_t::fps
ecs_metric_t fps
Frames per second.
Definition stats.h:132
ecs_world_stats_t::systems_ran
ecs_metric_t systems_ran
Number of systems run.
Definition stats.h:118
ecs_world_stats_t::type_count
ecs_metric_t type_count
Number of registered types.
Definition stats.h:77
ecs_world_stats_t::count
ecs_metric_t count
Number of entities.
Definition stats.h:68
ecs_world_stats_t::clear_count
ecs_metric_t clear_count
Number of clear commands.
Definition stats.h:102
ecs_world_stats_t::request_preflight_count
ecs_metric_t request_preflight_count
Number of preflight HTTP requests.
Definition stats.h:159
ecs_world_stats_t::other_count
ecs_metric_t other_count
Number of other commands.
Definition stats.h:106
ecs_world_stats_t::request_handled_ok_count
ecs_metric_t request_handled_ok_count
Number of successfully handled HTTP requests.
Definition stats.h:156
ecs_world_stats_t::emit_time
ecs_metric_t emit_time
Time spent on notifying observers.
Definition stats.h:129
ecs_world_stats_t::create_count
ecs_metric_t create_count
Number of times an ID has been created.
Definition stats.h:78
ecs_world_stats_t::not_alive_count
ecs_metric_t not_alive_count
Number of not alive (recyclable) entity IDs.
Definition stats.h:69
ecs_world_stats_t::stack_alloc_count
ecs_metric_t stack_alloc_count
Page allocations per frame.
Definition stats.h:147
ecs_world_stats_t::observer_count
ecs_metric_t observer_count
Number of observers.
Definition stats.h:93
ecs_world_stats_t::last_
int64_t last_
Used for field iteration.
Definition stats.h:165
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:117
ecs_world_stats_t::stack_outstanding_alloc_count
ecs_metric_t stack_outstanding_alloc_count
Difference between allocs and frees.
Definition stats.h:149
ecs_world_stats_t::request_invalid_count
ecs_metric_t request_invalid_count
Number of invalid HTTP requests.
Definition stats.h:155
ecs_world_stats_t::block_alloc_count
ecs_metric_t block_alloc_count
Block allocations per frame.
Definition stats.h:144
ecs_world_stats_t::first_
int64_t first_
Used for field iteration.
Definition stats.h:64
ecs_world_stats_t::batched_entity_count
ecs_metric_t batched_entity_count
Number of entities for which commands were batched.
Definition stats.h:108
ecs_world_stats_t::ensure_count
ecs_metric_t ensure_count
Number of ensure commands.
Definition stats.h:104
ecs_world_stats_t::delta_time
ecs_metric_t delta_time
Delta time.
Definition stats.h:133
ecs_world_stats_t::add_count
ecs_metric_t add_count
Number of add commands.
Definition stats.h:99
ecs_world_stats_t::request_not_handled_count
ecs_metric_t request_not_handled_count
Number of unhandled HTTP requests.
Definition stats.h:158
ecs_world_stats_t::pair_count
ecs_metric_t pair_count
Number of pair IDs.
Definition stats.h:76
ecs_metric_t
Make all metrics the same size, so we can iterate over fields.
Definition stats.h:57
ecs_metric_t::gauge
ecs_gauge_t gauge
Gauge metric.
Definition stats.h:58
ecs_metric_t::counter
ecs_counter_t counter
Counter metric.
Definition stats.h:59