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

3-arity version of metrics.timers/timer is not implemented #111

Open
sebastianpoeplau opened this issue Oct 27, 2016 · 2 comments
Open

3-arity version of metrics.timers/timer is not implemented #111

sebastianpoeplau opened this issue Oct 27, 2016 · 2 comments

Comments

@sebastianpoeplau
Copy link

The arity-3 version of metrics.timers/deftimer tries to call timer with 3 arguments, which is not implemented. I guess it should either be dropped or call timer-with-reservoir. On a related note, is there a reason why timer passes the title through metrics.core/metric-name while timer-with-reservoir doesn't?

@michaelklishin
Copy link
Collaborator

I doubt there is a reason.

Feel free to look into a pull request.

@michaelklishin michaelklishin changed the title deftimer crashes when invoked with 3 arguments 3-arity version of metrics.timers/timer is not implemented Oct 27, 2016
@sebastianpoeplau
Copy link
Author

@michaelklishin I'm not sure if an arity-3 version of metrics.timers/timer makes sense: callers would create a new reservoir in vain on every call but the first. I think deftimer should rather delegate to metrics.timers/timer-with-reservoir in this case. Regarding naming, I can certainly add the call to metric-name in timer-with-reservoir, but that would not be a backwards-compatible change. Duplicating the function just for the sake of keeping naming consistent in deftimer doesn't seem elegant either, though. Do you have any preference?

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