Skip to content
Flecs
v4.1
Search
Ctrl K
include
flecs
addons
cpp
mixins
metrics
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
10
namespace
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. */
22
struct
metrics
{
23
/** Metric value component. */
24
using
Value
=
EcsMetricValue
;
25
/** Metric source component. */
26
using
Source
=
EcsMetricSource
;
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. */
42
metrics
(
flecs::world
&
world
);
43
};
44
45
/** @} */
46
47
}
builder.hpp
Metric builder.
EcsMetricSource
Component that stores metric source.
Definition
metrics.h:71
EcsMetricValue
Component that stores metric value.
Definition
metrics.h:66
flecs::metrics::CounterId
Counter ID metric kind.
Definition
decl.hpp:37
flecs::metrics::CounterIncrement
Counter increment metric kind.
Definition
decl.hpp:35
flecs::metrics::Counter
Counter metric kind.
Definition
decl.hpp:33
flecs::metrics::Gauge
Gauge metric kind.
Definition
decl.hpp:39
flecs::metrics::Instance
Metric instance tag.
Definition
decl.hpp:29
flecs::metrics::Metric
Metric tag.
Definition
decl.hpp:31
flecs::metrics::metrics
metrics(flecs::world &world)
Construct the metrics module.
Definition
impl.hpp:10
flecs::metrics::Value
EcsMetricValue Value
Metric value component.
Definition
decl.hpp:24
flecs::metrics::Source
EcsMetricSource Source
Metric source component.
Definition
decl.hpp:26
flecs::world
The world.
Definition
world.hpp:129
Esc
↑
↓
to navigate
↵
to open
Esc
to close