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

Added custom reservoir support #104

Merged
merged 1 commit into from May 27, 2016

Conversation

Projects
None yet
2 participants
@sunng87
Contributor

sunng87 commented May 27, 2016

Reservoir as an important feature is missing in current metrics-clojure. It allows histogram based metrics (histogram and timer) to drop some data based on custom strategy (uniform, sliding window, etc). This is helpful when we want to collect timer for last minute, for example.

The bad part is upstream API doesn't provide entry point for custom reservoir in MetricRegistry, so there is no way to use this feature with MetricRegistry's get-or-add API. Duplicated creation will lead to IllegalArgumentException. So I created new function for timer and histogram.

@michaelklishin @sjl PTAL

(feat) added custom reservoir support
Signed-off-by: Ning Sun <sunng@about.me>
@sunng87

This comment has been minimized.

Show comment
Hide comment
@sunng87

sunng87 May 27, 2016

Contributor

@michaelklishin Thanks for fast response. I just updated the style.

Contributor

sunng87 commented May 27, 2016

@michaelklishin Thanks for fast response. I just updated the style.

@michaelklishin michaelklishin self-assigned this May 27, 2016

@michaelklishin michaelklishin merged commit 04cf684 into metrics-clojure:master May 27, 2016

@michaelklishin

This comment has been minimized.

Show comment
Hide comment
@michaelklishin

michaelklishin May 27, 2016

Collaborator

Thank you!

Collaborator

michaelklishin commented May 27, 2016

Thank you!

@sunng87 sunng87 deleted the sunng87:feature/reservoir branch May 27, 2016

@sunng87

This comment has been minimized.

Show comment
Hide comment
@sunng87

sunng87 May 27, 2016

Contributor

@michaelklishin possible to make a release for this?

Contributor

sunng87 commented May 27, 2016

@michaelklishin possible to make a release for this?

@michaelklishin

This comment has been minimized.

Show comment
Hide comment
@michaelklishin

michaelklishin May 27, 2016

Collaborator

@sunng87 I'll try making one over the weekend.

Collaborator

michaelklishin commented May 27, 2016

@sunng87 I'll try making one over the weekend.

@michaelklishin

This comment has been minimized.

Show comment
Hide comment
@michaelklishin

michaelklishin Jun 1, 2016

Collaborator

@sunng87 2.7.0 is up on Clojars.

Collaborator

michaelklishin commented Jun 1, 2016

@sunng87 2.7.0 is up on Clojars.

@sunng87

This comment has been minimized.

Show comment
Hide comment
@sunng87

sunng87 Jun 1, 2016

Contributor

@michaelklishin Excellent! Thank you!

Contributor

sunng87 commented Jun 1, 2016

@michaelklishin Excellent! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment