aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-03-17 12:37:41 +0100
committerOliver Smith <osmith@sysmocom.de>2021-03-17 17:52:37 +0100
commitd290439b4afe928e7e341540cb92f1abf36a82cb (patch)
tree7bd6f0ce96a532c2fa0a05c3a9220d346ecd8c38 /src
parentd89d35e933baec9bfa5fc78a8230c6e8fea62efe (diff)
stats: log error when missing stats values
Let the user know when the stats were not consumed fast enough for the given FIFO length. Related: SYS#4877 Change-Id: If0e8ab55103007693101538fb6ea310075217774
Diffstat (limited to 'src')
-rw-r--r--src/stat_item.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stat_item.c b/src/stat_item.c
index ba364640..a44b3ad7 100644
--- a/src/stat_item.c
+++ b/src/stat_item.c
@@ -60,6 +60,7 @@
#include <osmocom/core/talloc.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/stat_item.h>
+#include <osmocom/core/logging.h>
/*! global list of stat_item groups */
static LLIST_HEAD(osmo_stat_item_groups);
@@ -242,6 +243,10 @@ int osmo_stat_item_get_next(const struct osmo_stat_item *item, int32_t *next_idx
idx_delta = item_value->id + 1 - *next_idx;
+ if (idx_delta > 1) {
+ LOGP(DLSTATS, LOGL_ERROR, "%s: %d stats values skipped\n", item->desc->name, idx_delta - 1);
+ }
+
*next_idx = item_value->id + 1;
return idx_delta;