Change in libosmocore[master]: stat_item: make value ids item specific
gerrit-no-reply at lists.osmocom.org
Tue Apr 6 10:00:28 UTC 2021
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
to look at the new patch set (#2).
Change subject: stat_item: make value ids item specific
stat_item: make value ids item specific
Fix counting of values missed because of FIFO overflow in
osmo_stat_item_get_next(), by assigning a new item value id effectively
as item->value[n + 1].id = item->value[n].id + 1, instead of increasing
a global_value_id that is shared between all items and groups. With
global_value_id, the count of values missed was wrong for one item, as
soon as a new value was added to another item.
This partially reverts b27b352e ("stats: Use a global index for stat
item values") from 2015, right after stats was added to libosmocore. It
was supposed to make multiple readers (reporters) possible, which could
read independently from stat_item (and later added comments explain it
like that). But this remained unused, stats has implemented multiple
reporters by reading all stat_items once and sending the same data to
all enabled reporters. The patch caused last_value_index in struct
osmo_stat_item to always remain at -1.
Replace this unused last_value_index with stats_next_id, so stats can
store the item-specific next_id in the struct again. It appears that
stats is the only direct user of osmo_stat_item, but if there are
others, they can bring their own item-specific next_id: functions in
stat_item.c still accept a next_id argument.
4 files changed, 44 insertions(+), 44 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/23508/2
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/23508
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: daniel <dwillmann at sysmocom.de>
Gerrit-CC: pespin <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log