daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/23234 )
Change subject: stats: add BTS uptime counter ...................................................................... Patch Set 6: (2 comments) Thanks for picking up my slack! Looks close to me as well, just one additional comment about resetting the uptime. https://gerrit.osmocom.org/c/osmo-bsc/+/23234/6/src/osmo-bsc/bts.c File src/osmo-bsc/bts.c: https://gerrit.osmocom.org/c/osmo-bsc/+/23234/6/src/osmo-bsc/bts.c@564 PS6, Line 564: /* if the BTS is not up, skip this update */ With this check I think the uptime will stay at whatever value it was before a BTS disconnected and only reset to 0 after the BTS reconnects. Extended downtimes should be reported as 0 uptime in my opinion and not as a horizontal line at whatever value was reported last. You could use osmo_stat_item_get_last() to check if the last uptime value is different from the new one and only report then. https://gerrit.osmocom.org/c/osmo-bsc/+/23234/6/src/osmo-bsc/bts.c@576 PS6, Line 576: uptime_seconds = difftime(tp.tv_sec, bts->uptime); > What about reusing bts_uptime() just below instead of rewriting all of it in > this new function? […] ACK -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/23234 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ib17674bbe95e828cebff12de9e0b30f06447ef6c Gerrit-Change-Number: 23234 Gerrit-PatchSet: 6 Gerrit-Owner: iedemam <[email protected]> Gerrit-Assignee: daniel <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <[email protected]> Gerrit-Reviewer: laforge <[email protected]> Gerrit-Reviewer: pespin <[email protected]> Gerrit-CC: dexter <[email protected]> Gerrit-Comment-Date: Tue, 04 May 2021 08:41:20 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <[email protected]> Gerrit-MessageType: comment
