public class CodahaleMetricWriter extends Object implements MetricWriter
MetricWriter that send data to a Codahale MetricRegistry based on a
naming convention:
increment(Delta) with names in "meter.*" are treated as
Meter eventsCounter valuesset(Metric) with names in "histogram.*" are treated as
Histogram updatesset(Metric) with names in "timer.*" are treated as Timer
updatesGauge values (single valued
measurements of type double)| Constructor and Description |
|---|
CodahaleMetricWriter(MetricRegistry registry)
Create a new
CodahaleMetricWriter instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
increment(Delta<?> delta)
Increment the value of a metric (or decrement if the delta is negative).
|
void |
reset(String metricName)
Reset the value of a metric, usually to zero value.
|
void |
set(Metric<?> value)
Set the value of a metric.
|
public CodahaleMetricWriter(MetricRegistry registry)
CodahaleMetricWriter instance.registry - the underlying metric registrypublic void increment(Delta<?> delta)
MetricWriterincrement in interface MetricWriterdelta - the amount to increment bypublic void set(Metric<?> value)
MetricWriterset in interface MetricWriterpublic void reset(String metricName)
MetricWriterreset in interface MetricWritermetricName - the name to resetCopyright © 2014 Pivotal Software, Inc.. All rights reserved.