codahale/metrics — pull request #402 by fernandezpablo85 (2013-05-28 02:42:11+00:00)
Title: Specific rate and duration units for JmxReporter

This allows you use a specific rate and duration unit for each metric:

```scala
val registry = new MetricRegistry
val t1 = registry.timer("seconds")
val t2 = registry.timer("millis")
val t3 = registry.timer("default")

t1.update(100, TimeUnit.SECONDS)
t1.update(200, TimeUnit.SECONDS)
t1.update(300, TimeUnit.SECONDS)

t2.update(10, TimeUnit.MILLISECONDS)
t2.update(20, TimeUnit.MILLISECONDS)
t2.update(30, TimeUnit.MILLISECONDS)

t3.update(20, TimeUnit.SECONDS)
t3.update(30, TimeUnit.SECONDS)

val rates = Map("seconds" -> TimeUnit.SECONDS, "millis" -> TimeUnit.MILLISECONDS).asJava
val durations = Map("seconds" -> TimeUnit.SECONDS, "millis" -> TimeUnit.MILLISECONDS).asJava

val reporter = JmxReporter.forRegistry(registry).specificRateUnits(rates).specificDurationUnits(durations).build()
```