26#define ECS_STAT_WINDOW (60)
38 double value[ECS_STAT_WINDOW];
186 int32_t system_count;
250void ecs_world_stats_log(
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.
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_stats_repeat_last(ecs_query_stats_t *stats)
Repeat last measurement.
FLECS_API void ecs_world_stats_get(const ecs_world_t *world, ecs_world_stats_t *stats)
Get world statistics.
FLECS_API void ecs_query_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_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 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 void ecs_query_stats_reduce(ecs_query_stats_t *dst, const ecs_query_stats_t *src)
Reduce source measurement window into single destination measurement.
FLECS_API void ecs_metric_copy(ecs_metric_t *m, int32_t dst, int32_t src)
Copy measurement.
FLECS_API void ecs_query_stats_copy_last(ecs_query_stats_t *dst, const ecs_query_stats_t *src)
Copy last measurement from source to destination.
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.
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.
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 bool ecs_pipeline_stats_get(ecs_world_t *world, ecs_entity_t pipeline, ecs_pipeline_stats_t *stats)
Get pipeline statistics.
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_id_t ecs_entity_t
An entity identifier.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
struct ecs_query_t ecs_query_t
A query that caches its results.
#define ecs_float_t
Customizable precision for floating point operations.
flecs::pipeline_builder pipeline() const
Create a new pipeline.
flecs::query< Comps... > query(flecs::query_base &parent, Args &&... args) const
Create a subquery.
Monotonically increasing counter.
ecs_gauge_t rate
Keep track of deltas too.
Simple value that indicates current state.
Statistics for all systems in a pipeline.
ecs_map_t system_stats
Map with system statistics.
int32_t rebuild_count
Number of times pipeline has rebuilt.
int32_t system_count
Number of systems in pipeline.
ecs_vec_t systems
Vector with system ids of all systems in the pipeline.
int32_t active_system_count
Number of active systems in pipeline.
ecs_vec_t sync_points
Vector with sync point stats.
int32_t t
Current position in ringbuffer.
Statistics for a single query (use ecs_query_stats_get)
int32_t t
Current position in ringbuffer.
ecs_metric_t matched_table_count
Matched non-empty tables.
ecs_metric_t matched_entity_count
Number of matched entities.
ecs_metric_t matched_empty_table_count
Matched empty tables.
Statistics for sync point.
Statistics for a single system (use ecs_system_stats_get)
ecs_metric_t invoke_count
Number of times system is invoked.
bool task
Is system a task.
ecs_metric_t time_spent
Time spent processing a system.
ecs_metric_t alloc_count
Allocs per frame.
ecs_metric_t block_free_count
Block frees per frame.
ecs_metric_t system_time
Time spent on running systems.
ecs_metric_t world_time_raw
Actual time passed since simulation start (first time progress() is called)
ecs_metric_t delete_count
Number of times id has been deleted.
ecs_metric_t rematch_count
Number of query rematches.
ecs_metric_t frame_time
Time spent processing a frame.
ecs_metric_t tag_count
Number of tag ids (ids without data)
ecs_metric_t component_count
Number of components ids (ids with data)
ecs_metric_t system_count
Number of systems.
ecs_metric_t merge_count
Number of merges executed.
ecs_metric_t free_count
Frees per frame.
ecs_metric_t query_count
Number of queries.
ecs_metric_t world_time
Simulation time passed since simulation start.
ecs_metric_t realloc_count
Reallocs per frame.
ecs_metric_t merge_time
Time spent on merging commands.
ecs_metric_t outstanding_alloc_count
Difference between allocs & frees.
ecs_metric_t observers_ran
Number of times an observer was invoked.
ecs_metric_t frame_count
Number of frames processed.
ecs_metric_t event_emit_count
Number of events emitted.
ecs_metric_t empty_count
Number of empty tables.
ecs_metric_t block_outstanding_alloc_count
Difference between allocs & frees.
int32_t t
Current position in ringbuffer.
ecs_metric_t stack_free_count
Page frees per frame.
ecs_metric_t rematch_time
Time spent on rematching.
ecs_metric_t fps
Frames per second.
ecs_metric_t systems_ran
Number of systems ran.
ecs_metric_t type_count
Number of registered types.
ecs_metric_t count
Number of entities.
ecs_metric_t emit_time
Time spent on notifying observers.
ecs_metric_t create_count
Number of times id has been created.
ecs_metric_t not_alive_count
Number of not alive (recyclable) entity ids.
ecs_metric_t stack_alloc_count
Page allocations per frame.
ecs_metric_t observer_count
Number of observers.
ecs_metric_t pipeline_build_count
Number of system pipeline rebuilds (occurs when an inactive system becomes active).
ecs_metric_t stack_outstanding_alloc_count
Difference between allocs & frees.
ecs_metric_t block_alloc_count
Block allocations per frame.
ecs_metric_t delta_time
Delta_time.
ecs_metric_t pair_count
Number of pair ids.
flecs::system_builder< Components... > system(Args &&... args) const
Create a new system.
Make all metrics the same size, so we can iterate over fields.