Change in osmo-bsc[master]: add time_cc API: cumlative counter for time, reported as rate_ctr

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Nov 2 16:45:21 UTC 2021


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/25973 )

Change subject: add time_cc API: cumlative counter for time, reported as rate_ctr
......................................................................


Patch Set 1:

{ struct timespec last; struct timer_list timer; }

1- Last channel is allocated:
* clock_gettime(last); timer_schedule(cb_func);

2- cb_func triggers:
* clock_gettime(now), osmo_stat_item_add(st, now - last); last = now; timer_schedule(cb_func);

3- A channel is freed:
* if (time_is_pending(timer)) { clock_gettime(now), osmo_stat_item_add(st, now - last); timer_stop(timer); }

"counting" is not even needed, the timer_is_pending() is enough to see if it is counting or not. Is there a problem with this approach? AFAIU this would track time even if its under granularity of the timer.


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icdd36f27cb54b2e1b940c9e6404ba9dd3692a310
Gerrit-Change-Number: 25973
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 02 Nov 2021 16:45:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211102/96898f35/attachment.htm>


More information about the gerrit-log mailing list