iconara/multimeter — pull request #8 by grddev (2014-11-27 09:22:24+00:00)
Title: Re-implement multimeter as a much thinner layer on top of metrics-core-jars

The main reason why this work was started, was that I realized that using the DSL methods incurred a significant overhead. Rather than optimizing the DSL methods, it seems reasonable to just remove them, as they add very little benefit. Previously, we used to write

```ruby
class Measured
include Multimeter::LinkedMetrics

meter :stuff

def initialize(...)
...
super()
end

def do_stuff(...)
...
stuff.mark
...
end
end
```

Compared with the explicit interface below, the above is hardly shorter or in any way more convenient.

```ruby
class Measured
def initialize(..., meter_registry)
@stuff_meter = meter_registry.meter(:stuff)
...
end

def do_stuff(...)
...
@stuff_meter.mark
...
end
end
```

In addition to removing the DSL, the pull request updates `metrics-core-jars` to 3.x, which meant that the aggregate abstraction was no longer as useful. Previously, aggregates could be used to avoid contention around the atomic integers inside the Metrics library. With the 3.x version, the Metrics library has moved over to long adders, which do not suffer from the same problems.

Once aggregates are gone, the sub-registry feature only makes sense for structuring purposes. While such a structure might have some benefits, it is unclear whether it is worth the complexity this feature had before. This pull request removes the sub-registry feature in preference for exposing an interface to the underlying metric registry. This leaves room to implement (a simpler version of) sub-registries in the future, when the need becomes apparent.

In addition to the above major changes, this pull request also adds rudimentary tests for the JMX feature, as well as an ambiguous overload resolution issue, and some other minor cleanups.