<p>osmith <strong>uploaded patch set #3</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/23508">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stat_item: make value ids item specific<br><br>Fix counting of values missed because of FIFO overflow in<br>osmo_stat_item_get_next(), by assigning a new item value id effectively<br>as item->value[n + 1].id = item->value[n].id + 1, instead of increasing<br>a global_value_id that is shared between all items and groups. With<br>global_value_id, the count of values missed was wrong for one item, as<br>soon as a new value was added to another item.<br><br>This partially reverts b27b352e ("stats: Use a global index for stat<br>item values") from 2015, right after stats was added to libosmocore. It<br>was supposed to make multiple readers (reporters) possible, which could<br>read independently from stat_item (and later added comments explain it<br>like that). But this remained unused, stats has implemented multiple<br>reporters by reading all stat_items once and sending the same data to<br>all enabled reporters. The patch caused last_value_index in struct<br>osmo_stat_item to always remain at -1.<br><br>Replace this unused last_value_index with stats_next_id, so stats can<br>store the item-specific next_id in the struct again. It appears that<br>stats is the only direct user of osmo_stat_item, but if there are<br>others, they can bring their own item-specific next_id: functions in<br>stat_item.c still accept a next_id argument.<br><br>Related: OS#5088<br>Change-Id: Ie65dcdf52c8fc3d916e20d7f0455f6223be6b64f<br>---<br>M include/osmocom/core/stat_item.h<br>M src/stat_item.c<br>M src/stats.c<br>M tests/stats/stats_test.c<br>4 files changed, 44 insertions(+), 44 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/23508/3</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/23508">change 23508</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/23508"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ie65dcdf52c8fc3d916e20d7f0455f6223be6b64f </div>
<div style="display:none"> Gerrit-Change-Number: 23508 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>