public class DropwizardMetricServices extends Object implements CounterService, GaugeService
GaugeService
and CounterService
that sends data to a Dropwizard
MetricRegistry
based on a naming convention:
increment(String)
with names in "meter.*" are treated as
Meter
eventsCounter
valuessubmit(String, double)
with names in "histogram.*" are treated
as Histogram
updatessubmit(String, double)
with names in "timer.*" are treated as
Timer
updatesGauge
values (single valued
measurements of type double)Constructor and Description |
---|
DropwizardMetricServices(com.codahale.metrics.MetricRegistry registry)
Create a new
DropwizardMetricServices instance. |
Modifier and Type | Method and Description |
---|---|
void |
decrement(String name)
Decrement the specified counter by 1.
|
void |
increment(String name)
Increment the specified counter by 1.
|
void |
reset(String name)
Reset the specified counter.
|
void |
submit(String name,
double value)
Set the specified gauge value
|
public DropwizardMetricServices(com.codahale.metrics.MetricRegistry registry)
DropwizardMetricServices
instance.registry
- the underlying metric registrypublic void increment(String name)
CounterService
increment
in interface CounterService
name
- the name of the counterpublic void decrement(String name)
CounterService
decrement
in interface CounterService
name
- the name of the counterpublic void submit(String name, double value)
GaugeService
submit
in interface GaugeService
name
- the name of the gauge to setvalue
- the value of the gaugepublic void reset(String name)
CounterService
reset
in interface CounterService
name
- the name of the counterCopyright © 2015 Pivotal Software, Inc.. All rights reserved.