Change in libosmocore[master]: vty 'stats reset': do not reset stat_items

neels gerrit-no-reply at lists.osmocom.org
Mon Aug 23 19:22:39 UTC 2021


Hello Jenkins Builder, laforge, pespin, daniel, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/libosmocore/+/25214

to look at the new patch set (#3).

Change subject: vty 'stats reset': do not reset stat_items
......................................................................

vty 'stats reset': do not reset stat_items

Exempt all stat_item statistics from 'stats reset'. Only reset rate_ctr
statistics to zero.

The rate_ctr statistics have an implicit time scale, counting occurences
per time unit. For them it makes sense to reset all ratings and start
from zero, for example in a test suite (e.g. our TTCN3 BSC_Tests).

In contrast, stat_item statistics count number of objects or nr of
specific object stati at any given time, and they do not deteriorate
over time. Many stat items depend on increment/decrement to be sane.

For example, in osmo-bsc, if the nr of connected BTS is 3, that does not
make sense to be reset to zero. There are still 3 BTS connected, only
the stat_item would suddenly reflect zero. From then on, it'd be wrong.

All stat_items are by definition wrong after a 'stats reset'.
- Those that depend on increment/decrement will be wrong until the
  program exits, and
- those that are set to absolute values will be wrong up until the next
  value is set. That could be seconds or hours later, depending.

Related: SYS#5542
Change-Id: If2134768b1076e7af189276c45f2a09a4944303e
---
M src/vty/stats_vty.c
1 file changed, 1 insertion(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/25214/3
-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/25214
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: If2134768b1076e7af189276c45f2a09a4944303e
Gerrit-Change-Number: 25214
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: dexter <pmaier at sysmocom.de>
Gerrit-CC: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210823/fcfc50f8/attachment.htm>


More information about the gerrit-log mailing list