msuraev has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30304 )

Change subject: rate_ctr: drop rate estimation code
......................................................................

rate_ctr: drop rate estimation code

Drop the code which tried to estimate the value for the next timeframe:
it accumulated error over time which only adds confusion.

N. B: this means that long-term intervals (day, hour) will show the rate of 0 
until
corresponding timeframe passes. This matches how other monitoring software [1] 
behaves.

[1] https://learn.netdata.cloud

Fixes: OS#5671
Change-Id: I07232e9ff8bd62403ae82d9bd60d967d40b54ebc
---
M src/rate_ctr.c
1 file changed, 0 insertions(+), 5 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  msuraev: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/rate_ctr.c b/src/rate_ctr.c
index 3fc4992..44e2658 100644
--- a/src/rate_ctr.c
+++ b/src/rate_ctr.c
@@ -306,11 +306,6 @@
        ctr->intv[intv].rate = ctr->current - ctr->intv[intv].last;
        /* save current counter for next interval */
        ctr->intv[intv].last = ctr->current;
-
-       /* update the rate of the next bigger interval.  This will
-        * be overwritten when that next larger interval expires */
-       if (intv + 1 < ARRAY_SIZE(ctr->intv))
-               ctr->intv[intv+1].rate += ctr->intv[intv].rate;
 }

 static struct osmo_fd rate_ctr_timer = { .fd = -1 };

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30304
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I07232e9ff8bd62403ae82d9bd60d967d40b54ebc
Gerrit-Change-Number: 30304
Gerrit-PatchSet: 26
Gerrit-Owner: msuraev <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: msuraev <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to