Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
monitor.h
Go to the documentation of this file.
1
9#ifdef FLECS_MONITOR
10
19#ifndef FLECS_MONITOR_H
20#define FLECS_MONITOR_H
21
22#ifndef FLECS_MODULE
23#define FLECS_MODULE
24#endif
25
26#ifndef FLECS_STATS
27#define FLECS_STATS
28#endif
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34FLECS_API extern ECS_COMPONENT_DECLARE(FlecsMonitor);
35FLECS_API extern ECS_COMPONENT_DECLARE(EcsWorldStats);
38
39FLECS_API extern ecs_entity_t EcsPeriod1s;
40FLECS_API extern ecs_entity_t EcsPeriod1m;
41FLECS_API extern ecs_entity_t EcsPeriod1h;
42FLECS_API extern ecs_entity_t EcsPeriod1d;
43FLECS_API extern ecs_entity_t EcsPeriod1w;
44
45typedef struct {
46 ecs_ftime_t elapsed;
47 int32_t reduce_count;
49
50typedef struct {
54
55typedef struct {
59
60typedef struct {
61 /* Target FPS */
62 double target_fps;
64 /* Total time */
69 /* Last frame time */
74 /* Frame count */
75 int64_t frame_count;
77
78/* Module import */
79FLECS_API
80void FlecsMonitorImport(
81 ecs_world_t *world);
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif
88
91#endif
ecs_id_t ecs_entity_t
An entity identifier.
Definition flecs.h:305
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
Definition flecs.h:349
#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:43
double target_fps
Target FPS.
Definition monitor.h:62
double merge_time_total
Total time spent in merges.
Definition monitor.h:67
double frame_time_last
Time spent processing a frame.
Definition monitor.h:70
int64_t frame_count
Number of frames processed.
Definition monitor.h:75
double system_time_last
Time spent in systems.
Definition monitor.h:71
double system_time_total
Total time spent in systems.
Definition monitor.h:66
double frame_time_total
Total time spent processing a frame.
Definition monitor.h:65
double merge_time_last
Time spent in merges.
Definition monitor.h:72
Statistics for all systems in a pipeline.
Definition stats.h:192