-
Notifications
You must be signed in to change notification settings - Fork 80
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
Upgrade to Metrics 3.0, update our API to match it #22
Conversation
Also, there are some purely stylistic changes that have nothing to do with Metrics 3.0 but it's also |
Match the existing style. If you want to change whitespace to some weird new format I don't really care, but do it all at once in a separate PR. |
The problem is, with multi-arity functions the old style isn't really possible. We go from (defn deftimer [title] …) to (defn deftimer
([title]
…)
([^MetricRegistry reg title]
…)) I can move some of the functions to use earlier style, wouldn't it be even less consistent, though? |
Currently things look like this: (defn foo
"doc"
[a]
bar)
(defn foo
"doc"
([a]
bar)
([b]
baz)) If you want to add new functions, match this style. Otherwise you'll end up Then, in a separate PR afterwords you can add the extra whitespace to ALL I'm confused why would it be indented four spaces instead of two like everything (defn foo
"doc"
[a]
bar)
(defn foo
"doc"
([a]
bar)
([b]
baz)) |
I'm happy to see the upgrade to Metrics 3.0. The multiple arity approach seems like a reasonable compromise to maintain backwards compatibility (mostly) but at the same time support explicit registries. |
@sjl this is what the most recent stock clojure-mode indents it like. It shouldn't be 4 spaces, I'll investigate. |
@sjl is there anything else you want me to do with this PR? |
I'm hoping this is almost ready. I wanted to start using it, but if it's not up-to-date, I'm going to have to just do the java-interop thing on the metrics lib. |
+1, we are really interested in this and would be happy to help if needed! |
@sjl if there are no more comments in the next few days, I'll assume this is good to merge and release as 2.0 :) |
Yeah, it's fine. Go ahead. On Thu, May 15, 2014 at 4:41 PM, Michael Klishin
|
Upgrade to Metrics 3.0, update our API to match it
For #19.
I still need to update the docs but the idea I had in mind is implemented and all tests pass. Note that
one small feature (defgauge with a body) and a couple of tests are gone:
defgauge
w/ a body, so I decided to drop it for 2.0.@sjl thoughts?