libosmocore
0.9.6.311-c977
Osmocom core library
|
utility routines for keeping conters about events and the event rates. More...
#include <stdint.h>
#include <string.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/stat_item.h>
Functions | |
static | LLIST_HEAD (osmo_stat_item_groups) |
struct osmo_stat_item_group * | osmo_stat_item_group_alloc (void *ctx, const struct osmo_stat_item_group_desc *desc, unsigned int idx) |
Allocate a new group of counters according to description. More... | |
void | osmo_stat_item_group_free (struct osmo_stat_item_group *grp) |
Free the memory for the specified group of counters. More... | |
void | osmo_stat_item_set (struct osmo_stat_item *item, int32_t value) |
int | osmo_stat_item_get_next (const struct osmo_stat_item *item, int32_t *idx, int32_t *value) |
Retrieve the next value from the osmo_stat_item object. More... | |
int | osmo_stat_item_discard (const struct osmo_stat_item *item, int32_t *idx) |
Skip all values of the item and update idx accordingly. More... | |
int | osmo_stat_item_discard_all (int32_t *idx) |
Skip all values of all items and update idx accordingly. More... | |
int | osmo_stat_item_init (void *tall_ctx) |
Initialize the stat item module. More... | |
struct osmo_stat_item_group * | osmo_stat_item_get_group_by_name_idx (const char *name, const unsigned int idx) |
Search for item group based on group name and index. More... | |
const struct osmo_stat_item * | osmo_stat_item_get_by_name (const struct osmo_stat_item_group *statg, const char *name) |
Search for item group based on group name. More... | |
int | osmo_stat_item_for_each_item (struct osmo_stat_item_group *statg, osmo_stat_item_handler_t handle_item, void *data) |
Iteate over all items. More... | |
int | osmo_stat_item_for_each_group (osmo_stat_item_group_handler_t handle_group, void *data) |
Variables | |
static int32_t | global_value_id = 0 |
static void * | tall_stat_item_ctx |
utility routines for keeping conters about events and the event rates.