|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.yammer.metrics.reporting.AbstractReporter
com.yammer.metrics.reporting.AbstractPollingReporter
com.yammer.metrics.reporting.ConsoleReporter
public class ConsoleReporter
A simple reporters which prints out application metrics to a PrintStream periodically.
| Constructor Summary | |
|---|---|
ConsoleReporter(MetricsRegistry metricsRegistry,
PrintStream out,
MetricPredicate predicate)
Creates a new ConsoleReporter for a given metrics registry. |
|
ConsoleReporter(MetricsRegistry metricsRegistry,
PrintStream out,
MetricPredicate predicate,
Clock clock,
TimeZone timeZone)
Creates a new ConsoleReporter for a given metrics registry. |
|
ConsoleReporter(MetricsRegistry metricsRegistry,
PrintStream out,
MetricPredicate predicate,
Clock clock,
TimeZone timeZone,
Locale locale)
Creates a new ConsoleReporter for a given metrics registry. |
|
ConsoleReporter(PrintStream out)
Creates a new ConsoleReporter for the default metrics registry, with unrestricted
output. |
|
| Method Summary | |
|---|---|
static void |
enable(long period,
TimeUnit unit)
Enables the console reporter for the default metrics registry, and causes it to print to STDOUT with the specified period. |
static void |
enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit)
Enables the console reporter for the given metrics registry, and causes it to print to STDOUT with the specified period and unrestricted output. |
void |
processCounter(MetricName name,
Counter counter,
PrintStream stream)
Process the given counter. |
void |
processGauge(MetricName name,
Gauge<?> gauge,
PrintStream stream)
Process the given gauge. |
void |
processHistogram(MetricName name,
Histogram histogram,
PrintStream stream)
Process the given histogram. |
void |
processMeter(MetricName name,
Metered meter,
PrintStream stream)
Process the given Metered instance. |
void |
processTimer(MetricName name,
Timer timer,
PrintStream stream)
Process the given timer. |
void |
run()
The method called when a a poll is scheduled to occur. |
| Methods inherited from class com.yammer.metrics.reporting.AbstractPollingReporter |
|---|
shutdown, shutdown, start |
| Methods inherited from class com.yammer.metrics.reporting.AbstractReporter |
|---|
getMetricsRegistry |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConsoleReporter(PrintStream out)
ConsoleReporter for the default metrics registry, with unrestricted
output.
out - the PrintStream to which output will be written
public ConsoleReporter(MetricsRegistry metricsRegistry,
PrintStream out,
MetricPredicate predicate)
ConsoleReporter for a given metrics registry.
metricsRegistry - the metrics registryout - the PrintStream to which output will be writtenpredicate - the MetricPredicate used to determine whether a metric will be
output
public ConsoleReporter(MetricsRegistry metricsRegistry,
PrintStream out,
MetricPredicate predicate,
Clock clock,
TimeZone timeZone)
ConsoleReporter for a given metrics registry.
metricsRegistry - the metrics registryout - the PrintStream to which output will be writtenpredicate - the MetricPredicate used to determine whether a metric will be
outputclock - the Clock used to print timetimeZone - the TimeZone used to print time
public ConsoleReporter(MetricsRegistry metricsRegistry,
PrintStream out,
MetricPredicate predicate,
Clock clock,
TimeZone timeZone,
Locale locale)
ConsoleReporter for a given metrics registry.
metricsRegistry - the metrics registryout - the PrintStream to which output will be writtenpredicate - the MetricPredicate used to determine whether a metric will be
outputclock - the Clock used to print timetimeZone - the TimeZone used to print timelocale - the Locale used to print values| Method Detail |
|---|
public static void enable(long period,
TimeUnit unit)
period - the period between successive outputsunit - the time unit of period
public static void enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit)
metricsRegistry - the metrics registryperiod - the period between successive outputsunit - the time unit of periodpublic void run()
AbstractPollingReporter
run in interface Runnablerun in class AbstractPollingReporter
public void processGauge(MetricName name,
Gauge<?> gauge,
PrintStream stream)
MetricProcessor
processGauge in interface MetricProcessor<PrintStream>name - the name of the gaugegauge - the gaugestream - the context of the meter
public void processCounter(MetricName name,
Counter counter,
PrintStream stream)
MetricProcessor
processCounter in interface MetricProcessor<PrintStream>name - the name of the countercounter - the counterstream - the context of the meter
public void processMeter(MetricName name,
Metered meter,
PrintStream stream)
MetricProcessorMetered instance.
processMeter in interface MetricProcessor<PrintStream>name - the name of the metermeter - the meterstream - the context of the meter
public void processHistogram(MetricName name,
Histogram histogram,
PrintStream stream)
MetricProcessor
processHistogram in interface MetricProcessor<PrintStream>name - the name of the histogramhistogram - the histogramstream - the context of the meter
public void processTimer(MetricName name,
Timer timer,
PrintStream stream)
MetricProcessor
processTimer in interface MetricProcessor<PrintStream>name - the name of the timertimer - the timerstream - the context of the meter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||