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

Support "arbitrary" mean throughput intervals in Meter #65

Open
CesarPantoja opened this issue Jan 9, 2019 · 1 comment
Open

Support "arbitrary" mean throughput intervals in Meter #65

CesarPantoja opened this issue Jan 9, 2019 · 1 comment

Comments

@CesarPantoja
Copy link

CesarPantoja commented Jan 9, 2019

The class ExpWeightedMovingAvg has a parameter which allows you to specify the period of reporting, yet there are 3 hardcoded instances in Meter:

            self.m1rate = ExpWeightedMovingAvg(period=1, clock=self.clock)
            self.m5rate = ExpWeightedMovingAvg(period=5, clock=self.clock)
            self.m15rate = ExpWeightedMovingAvg(period=15, clock=self.clock)

Which results in only getting those metrics in the dashboard.

Would be great if you could also specify your own intervals. Something like Meter(clock=self._clock, [1, 5, 15, 30, 60])

Would this be useful? Seems fairly trivial to implement, would be happy to create the PR.

@omergertel
Copy link
Owner

omergertel commented Jan 9, 2019

Sounds legit, mind opening a PR?
Make the default so that behavior doesn't change? Not sure what to do with the getters though

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

2 participants