<p style="white-space: pre-wrap; word-wrap: break-word;">Hello,</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not really liking this approach. I think you are abusing the CTR/stats to store some information which doesn't belong here.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Thanks for the review. I agree this approach is not yet acceptable. However, I do think that storing BTS uptime in the stats system is a valid use of the stats system and a desirable feature for many people. It is shown in the VTY output alongside other metrics already recorded in stat counters. My goal here is to efficiently translate that uptime output into a new statsd counter.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">First of all, the way you count uptime is for sure going to skew after a while from real time, since you don't account for delays in timer scheduling (so let's say you sum 1 second to counter, but you are doing that after eg 1.00XXX seconds every time).<br>Second, "uptime" to me doesn't mean all TRX are unlocked, I would think "uptime" more as "at least 1 TRX serving".</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I can add precise increments to the counter based on actual elapsed time and not rely on timer scheduling. I can also change uptime to represent your suggestion of "at least 1 TRX serving".</p><p style="white-space: pre-wrap; word-wrap: break-word;">Let me know if there is, in general, a more preferable way to add these "non-event" driven metrics to the stats counters. For now I will improve the two things you mention.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Thanks again for your time,<br>-Michael</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/23234">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/23234">change 23234</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/23234"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ib17674bbe95e828cebff12de9e0b30f06447ef6c </div>
<div style="display:none"> Gerrit-Change-Number: 23234 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: iedemam <michael@kapsulate.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 04 Mar 2021 13:38:49 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>