stat_item_internal.h
Go to the documentation of this file.
#pragma once
struct osmo_stat_item_period {
uint32_t n;
int32_t min;
int32_t last;
int32_t max;
int64_t sum;
};
struct osmo_stat_item {
const struct osmo_stat_item_desc *desc;
struct osmo_stat_item_period value;
struct osmo_stat_item_period reported;
};
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