Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Lag monitor better calc #546

Merged
merged 2 commits into from
Feb 23, 2017
Merged

Lag monitor better calc #546

merged 2 commits into from
Feb 23, 2017

Conversation

Dieterbe
Copy link
Contributor

@Dieterbe Dieterbe commented Feb 23, 2017

  • more accurate rate calculation. (don't round too early)
  • fix behavior for offset-commit-interval < 1s:
    if Store() is called again in under a second, previous code would update lastTs
    but return without setting rate since duration would round to 0.
    so many successive calls with <1s in between, even if they cover many seconds in aggregate
    would never lead to the rate being properly calculated.
    Now we still consider <1s not high-res enough to execute the
    calculation, but we only update the baseline when appropriate.
    the benefit now also is that this value can be tuned, instead of being implied through rounding.

* more accurate rate calculation. (don't round too early)
* fix behavior for offset-commit-interval < 1s:
  if Store() is called again in under a second, previous code would update lastTs
  but return without setting rate since duration would round to 0.
  so many successive calls with <1s in between, even if they cover many seconds in aggregate
  would never lead to the rate being properly calculated.
  Now we still consider <1s not high-res enough to execute the
  calculation, but we only update the baseline when appropriate.
  the benefit now also is that this value can be tuned, instead of being
  implied through rounding.
@woodsaj woodsaj merged commit 66208bd into master Feb 23, 2017
@woodsaj woodsaj deleted the lag-monitor-better-calc branch February 23, 2017 17:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants