Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving averages of ratios #78

Open
alex-davidson opened this issue Jul 4, 2017 · 0 comments
Open

Moving averages of ratios #78

alex-davidson opened this issue Jul 4, 2017 · 0 comments

Comments

@alex-davidson
Copy link

I have a producer/consumer system, with a Meter for each side. RatioGauge exposes the instantaneous produced/consumed ratio, but since the producer generally starts queuing things before the consumer finishes processing any this has spiky startup characteristics, which will trigger a threshold-based alert no matter what I set the threshold to.

It would be useful to be able to monitor the moving average over a time period instead, which would smooth out any irrelevant spikes and measurement artefacts.

How might I go about producing one-, five- and fifteen-minute moving averages of this value as a derived metric? I assume this will involve sampling the ratio periodically and inserting the values into a Histogram, but is there an idiomatic way of doing this? The obvious way appears a little inefficient, ie. firing a callback every second.

I'm not entirely sure about the characteristics of the reservoirs with regard to initial samples, either. Will they need priming with zeroes to prevent the averages starting from the initial (possibly infinite) value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant