aboutsummaryrefslogtreecommitdiffstats
path: root/tests/stats/stats_test.err
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2021-09-14 21:49:00 +0200
committerneels <nhofmeyr@sysmocom.de>2021-09-30 18:33:43 +0000
commit6a5940740a776fcb2ea2e4c8aecbe43c1594e3b1 (patch)
treefa60b01dd5f27527e2cd6d3f1eaee28119881260 /tests/stats/stats_test.err
parente90c7176be0f627610b9c28f44551ad19f114672 (diff)
refactor stat_item: report only changed values
Change the functionality of skipping unchanged values: instead of looking up whether new values have been set on a stat item, rather remember the last reported value and skip reporting identical values. stats_test.c shows that previously, a stat item reported a value of 10 again, even though the previous report had already sent a value of 10. That's just because the value 10 was explicitly set again, internally. From a perspective of preserving all data points, it could make sense to send consecutive identical values. But since we already collapse all data points per reporting period into a max, that is pointless. Related: SYS#5542 Change-Id: I8f4cf34dfed17e0879716fa2cbeee137c158978b
Diffstat (limited to 'tests/stats/stats_test.err')
-rw-r--r--tests/stats/stats_test.err6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/stats/stats_test.err b/tests/stats/stats_test.err
index a890e0fa..1e604d19 100644
--- a/tests/stats/stats_test.err
+++ b/tests/stats/stats_test.err
@@ -114,10 +114,8 @@ report (group 1, item 1 update):
test2: item p= g=test.one i=1 n=item.a v=10 u=ma
test1: item p= g=test.one i=1 n=item.a v=10 u=ma
reported: 0 counter vals, 2 stat item vals
-report (group 1, item 1 update twice):
- test2: item p= g=test.one i=1 n=item.a v=10 u=ma
- test1: item p= g=test.one i=1 n=item.a v=10 u=ma
-reported: 0 counter vals, 2 stat item vals
+report (group 1, item 1 update twice, with same value):
+reported: 0 counter vals, 0 stat item vals
report (group 1, item 1 update twice, check max):
test2: item p= g=test.one i=1 n=item.a v=20 u=ma
test1: item p= g=test.one i=1 n=item.a v=20 u=ma