<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/25214">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty 'stats reset': do not reset stat_items<br><br>Exempt all stat_item statistics from 'stats reset'. Only reset rate_ctr<br>statistics to zero.<br><br>The rate_ctr statistics have an implicit time scale, counting occurences<br>per time unit. For them it makes sense to reset all ratings and start<br>from zero, for example in a test suite (e.g. our TTCN3 BSC_Tests).<br><br>In contrast, stat_item statistics count number of objects or nr of<br>specific object stati at any given time, and they do not deteriorate<br>over time. Many stat items depend on increment/decrement to be sane.<br><br>For example, in osmo-bsc, if the nr of connected BTS is 3, that does not<br>make sense to be reset to zero. There are still 3 BTS connected, only<br>the stat_item would suddenly reflect zero. From then on, it'd be wrong.<br><br>All stat_items are by definition wrong after a 'stats reset'.<br>- Those that depend on increment/decrement will be wrong until the<br>  program exits, and<br>- those that are set to absolute values will be wrong up until the next<br>  value is set. That could be seconds or hours later, depending.<br><br>Related: SYS#5542<br>Change-Id: If2134768b1076e7af189276c45f2a09a4944303e<br>---<br>M src/vty/stats_vty.c<br>1 file changed, 0 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/25214/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c</span><br><span>index ba45e1e..a0df24b 100644</span><br><span>--- a/src/vty/stats_vty.c</span><br><span>+++ b/src/vty/stats_vty.c</span><br><span>@@ -598,7 +598,6 @@</span><br><span>       STATS_STR "Reset all stats\n")</span><br><span> {</span><br><span>         rate_ctr_for_each_group(reset_rate_ctr_group_handler, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">-        osmo_stat_item_for_each_group(reset_osmo_stat_item_group_handler, NULL);</span><br><span>        return CMD_SUCCESS;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/25214">change 25214</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/+/25214"/><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: If2134768b1076e7af189276c45f2a09a4944303e </div>
<div style="display:none"> Gerrit-Change-Number: 25214 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>