|
prom 0.1.0
Client-independent C++23 Prometheus/OpenMetrics metric abstraction
|
Structural bridge to dimval: the DimensionalValue concept, NormalizedValue, and the normalize() overloads.
More...


Go to the source code of this file.
Classes | |
| struct | prom::NormalizedValue |
| A plain magnitude paired with the unit it was carrying (empty for raw arithmetic). More... | |
Namespaces | |
| namespace | prom |
Concepts | |
| concept | prom::DimensionalValue |
Satisfied by a dimval-like value: it exposes a value_t, reports its magnitude through numeric_as_double(), and carries unit metadata through either unit_descriptor() (measures) or descriptor() (units). | |
Functions | |
| template<DimensionalValue V> | |
| NormalizedValue | prom::normalize (const V &value) |
Reduce a dimval value to a NormalizedValue. | |
| template<class T > requires std::is_arithmetic_v<T> | |
| NormalizedValue | prom::normalize (T value) noexcept |
| Pass an arithmetic sample straight through with no unit attached. | |
Structural bridge to dimval: the DimensionalValue concept, NormalizedValue, and the normalize() overloads.
prom never includes a dimval header. The DimensionalValue concept matches dimval::UnitValue / dimval::MeasureValue purely structurally (duck typing on value_t, numeric_as_double(), and a descriptor accessor), so a consumer can hand prom dimensional values without prom taking a build-time dependency on dimval's concrete types.