com.yammer.metrics.reporting
Class CsvReporter
java.lang.Object
com.yammer.metrics.reporting.AbstractReporter
com.yammer.metrics.reporting.AbstractPollingReporter
com.yammer.metrics.reporting.CsvReporter
- All Implemented Interfaces:
- MetricsProcessor<CsvReporter.Context>, Runnable
public class CsvReporter
- extends AbstractPollingReporter
- implements MetricsProcessor<CsvReporter.Context>
|
Method Summary |
protected PrintStream |
createStreamForMetric(MetricName metricName)
Override to do tricks (such as testing). |
void |
processCounter(MetricName name,
CounterMetric counter,
CsvReporter.Context context)
|
void |
processGauge(MetricName name,
GaugeMetric<?> gauge,
CsvReporter.Context context)
|
void |
processHistogram(MetricName name,
HistogramMetric histogram,
CsvReporter.Context context)
|
void |
processMeter(MetricName name,
Metered meter,
CsvReporter.Context context)
|
void |
processTimer(MetricName name,
TimerMetric timer,
CsvReporter.Context context)
|
void |
run()
|
void |
shutdown()
Stops the reporter and closes any internal resources. |
void |
start(long period,
TimeUnit unit)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CsvReporter
public CsvReporter(File outputDir,
MetricsRegistry metricsRegistry,
MetricPredicate predicate)
throws Exception
- Throws:
Exception
CsvReporter
public CsvReporter(File outputDir,
MetricsRegistry metricsRegistry,
MetricPredicate predicate,
Clock clock)
throws Exception
- Throws:
Exception
CsvReporter
public CsvReporter(File outputDir,
MetricsRegistry metricsRegistry)
throws Exception
- Throws:
Exception
createStreamForMetric
protected PrintStream createStreamForMetric(MetricName metricName)
throws IOException
- Override to do tricks (such as testing).
- Throws:
IOException
run
public void run()
- Specified by:
run in interface Runnable
processMeter
public void processMeter(MetricName name,
Metered meter,
CsvReporter.Context context)
throws IOException
- Specified by:
processMeter in interface MetricsProcessor<CsvReporter.Context>
- Throws:
IOException
processCounter
public void processCounter(MetricName name,
CounterMetric counter,
CsvReporter.Context context)
throws IOException
- Specified by:
processCounter in interface MetricsProcessor<CsvReporter.Context>
- Throws:
IOException
processHistogram
public void processHistogram(MetricName name,
HistogramMetric histogram,
CsvReporter.Context context)
throws IOException
- Specified by:
processHistogram in interface MetricsProcessor<CsvReporter.Context>
- Throws:
IOException
processTimer
public void processTimer(MetricName name,
TimerMetric timer,
CsvReporter.Context context)
throws IOException
- Specified by:
processTimer in interface MetricsProcessor<CsvReporter.Context>
- Throws:
IOException
processGauge
public void processGauge(MetricName name,
GaugeMetric<?> gauge,
CsvReporter.Context context)
throws IOException
- Specified by:
processGauge in interface MetricsProcessor<CsvReporter.Context>
- Throws:
IOException
start
public void start(long period,
TimeUnit unit)
- Overrides:
start in class AbstractPollingReporter
shutdown
public void shutdown()
- Description copied from class:
AbstractReporter
- Stops the reporter and closes any internal resources.
- Overrides:
shutdown in class AbstractPollingReporter
Copyright © 2011. All Rights Reserved.