Package com.codahale.metrics
Class CsvReporter
- java.lang.Object
-
- com.codahale.metrics.ScheduledReporter
-
- com.codahale.metrics.CsvReporter
-
- All Implemented Interfaces:
Reporter,Closeable,AutoCloseable
public class CsvReporter extends ScheduledReporter
A reporter which creates a comma-separated values file of the measurements for each metric.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCsvReporter.BuilderA builder forCsvReporterinstances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CsvReporter.BuilderforRegistry(MetricRegistry registry)Returns a newCsvReporter.BuilderforCsvReporter.voidreport(SortedMap<String,Gauge> gauges, SortedMap<String,Counter> counters, SortedMap<String,Histogram> histograms, SortedMap<String,Meter> meters, SortedMap<String,Timer> timers)Called periodically by the polling thread.protected Stringsanitize(String name)-
Methods inherited from class com.codahale.metrics.ScheduledReporter
close, convertDuration, convertRate, getDisabledMetricAttributes, getDurationUnit, getRateUnit, isShutdownExecutorOnStop, report, start, start, stop
-
-
-
-
Method Detail
-
forRegistry
public static CsvReporter.Builder forRegistry(MetricRegistry registry)
Returns a newCsvReporter.BuilderforCsvReporter.- Parameters:
registry- the registry to report- Returns:
- a
CsvReporter.Builderinstance for aCsvReporter
-
report
public void report(SortedMap<String,Gauge> gauges, SortedMap<String,Counter> counters, SortedMap<String,Histogram> histograms, SortedMap<String,Meter> meters, SortedMap<String,Timer> timers)
Description copied from class:ScheduledReporterCalled periodically by the polling thread. Subclasses should report all the given metrics.- Specified by:
reportin classScheduledReporter- Parameters:
gauges- all of the gauges in the registrycounters- all of the counters in the registryhistograms- all of the histograms in the registrymeters- all of the meters in the registrytimers- all of the timers in the registry
-
-