Attention is currently required from: laforge, neels.
3 comments:
File src/osmo-hnbgw/nft_kpi.c:
Patch Set #9, Line 626: /* From here on, until we receive the next NFT_THREAD_GET_COUNTERS in this thread, the
Possible future improvement here is to use a double-buffer to fill next batch while the main thread is processing the previous one. Not needed for this first version though imo.
Patch Set #9, Line 700: osmo_timer_setup(&g_hnbgw->nft_kpi.get_counters_timer, nft_kpi_get_counters_cb, NULL);
possible idea for the future: keep interval tracking at the worker, use osmo_timerfd_*() here, this way we could easily track for instance how often the thread cannot cope with the expected counter update frequency.
Patch Set #9, Line 994: nft_kpi_get_counters_schedule();
So you call nft_kpi_get_counters_schedule() once you receive + process the counters, which will then schedule a new counter update every X34 uS.
However, you are not account for the (long) time it took for the counters to be retrieved.
Hence, in nft_kpi_get_counters_schedule(), you should store a last_ts = now() value, and subtract the processing time since last time you called it.
Otherwise, if you have X34 to let's say 1 second, but the counting takes 0.3 seconds, you are actually requesting counters every 1.3s (and actually getting them updated every 1.3+0.3s).
To view, visit change 36539. To unsubscribe, or for help writing mail filters, visit settings.