Skip to content
Flecs v4.1
decl.hpp
Go to the documentation of this file.
1/**
2 * @file addons/cpp/mixins/metrics/decl.hpp
3 * @brief Metrics declarations.
4 */
5
6#pragma once
7
8#include "builder.hpp"
9
10namespace flecs {
11
12/**
13 * @defgroup cpp_addons_metrics Metrics
14 * @ingroup cpp_addons
15 * The metrics module extracts metrics from components and makes them available
16 * through a unified component interface.
17 *
18 * @{
19 */
20
21/** Metrics module. */
22struct metrics {
23 /** Metric value component. */
25 /** Metric source component. */
27
28 /** Metric instance tag. */
29 struct Instance { };
30 /** Metric tag. */
31 struct Metric { };
32 /** Counter metric kind. */
33 struct Counter { };
34 /** Counter increment metric kind. */
35 struct CounterIncrement { };
36 /** Counter ID metric kind. */
37 struct CounterId { };
38 /** Gauge metric kind. */
39 struct Gauge { };
40
41 /** Construct the metrics module. */
43};
44
45/** @} */
46
47}
Metric builder.
Component that stores metric source.
Definition metrics.h:71
Component that stores metric value.
Definition metrics.h:66
Counter ID metric kind.
Definition decl.hpp:37
Counter increment metric kind.
Definition decl.hpp:35
Counter metric kind.
Definition decl.hpp:33
Gauge metric kind.
Definition decl.hpp:39
Metric instance tag.
Definition decl.hpp:29
Metric tag.
Definition decl.hpp:31
metrics(flecs::world &world)
Construct the metrics module.
Definition impl.hpp:10
EcsMetricValue Value
Metric value component.
Definition decl.hpp:24
EcsMetricSource Source
Metric source component.
Definition decl.hpp:26
The world.
Definition world.hpp:129