Attention is currently required from: neels, pespin. iedemam has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28165 )
Change subject: stats: new trackers for lchan life duration (v2) ......................................................................
Patch Set 1:
(1 comment)
This change is ready for review.
Patchset:
PS1: Hi all,
Here is my Mark II of the original CPU-hungry version (https://gerrit.osmocom.org/c/osmo-bsc/+/27081).
The changes being: - measure milliseconds, not deciseconds - store state every second, not every 100ms - use one timer per BSC, not one timer per lchan
I originally proposed using one timer per BTS. However, after looking at the weight of the calculation, it seems to be lighter than other BSC-wide calculations, specifically: bts_update_t3122_chan_load(). I've tried to make this summation + storage operation as lightweight as possible. I'm still open to one timer per BTS but this structure matches other similar operations such as storing uptime and updating t3122.
Testing has shown this to behave functionally identical to the previous version. There is some accuracy lost when an lchan is closed and the remainder of unrecorded time is discarded. Some improvements are possible for sure but this seems like roughly the way to go.
Feedback very welcome.
Thanks as always for your time, -Michael