libosmocore 1.13.1.1-afb4 Osmocom core library

stat_item_internal.h
Go to the documentation of this file.
1
3#pragma once
4
9 struct osmo_stat_item_period {
11 uint32_t n;
13 int32_t min;
15 int32_t last;
17 int32_t max;
19 int64_t sum;
20};
21
23 struct osmo_stat_item {
25 const struct osmo_stat_item_desc *desc;
26
28 struct osmo_stat_item_period value;
29
32 struct osmo_stat_item_period reported;
33};
34
osmo_stat_item_desc
Statistics item description.
Definition: stat_item.h:22
osmo_stat_item_period
Definition: stat_item_internal.h:9
osmo_stat_item_period::sum
int64_t sum
Sum of all values passed to osmo_stat_item_set() in the reporting period.
Definition: stat_item_internal.h:19
osmo_stat_item_period::n
uint32_t n
Number of osmo_stat_item_set() that occurred during the reporting period, zero if none.
Definition: stat_item_internal.h:11
osmo_stat_item_period::max
int32_t max
Largest value seen in a reporting period.
Definition: stat_item_internal.h:17
osmo_stat_item_period::min
int32_t min
Smallest value seen in a reporting period.
Definition: stat_item_internal.h:13
osmo_stat_item_period::last
int32_t last
Most recent value passed to osmo_stat_item_set(), or the item->desc->default_value if none.
Definition: stat_item_internal.h:15
osmo_stat_item
data we keep for each actual item
Definition: stat_item_internal.h:23
osmo_stat_item::desc
const struct osmo_stat_item_desc * desc
back-reference to the item description
Definition: stat_item_internal.h:25
osmo_stat_item::value
struct osmo_stat_item_period value
Current reporting period / current value.
Definition: stat_item_internal.h:28
osmo_stat_item::reported
struct osmo_stat_item_period reported
The results of the previous reporting period.
Definition: stat_item_internal.h:32