|
||||||||||
| 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.
| Field Summary |
|---|
| Fields inherited from class com.yammer.metrics.reporting.AbstractReporter |
|---|
metricsRegistry |
| 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,
CounterMetric counter,
PrintStream stream)
|
void |
processGauge(MetricName name,
GaugeMetric<?> gauge,
PrintStream stream)
|
void |
processHistogram(MetricName name,
HistogramMetric histogram,
PrintStream stream)
|
void |
processMeter(MetricName name,
Metered meter,
PrintStream stream)
|
void |
processTimer(MetricName name,
TimerMetric timer,
PrintStream stream)
|
void |
run()
|
| Methods inherited from class com.yammer.metrics.reporting.AbstractPollingReporter |
|---|
shutdown, shutdown, start |
| 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()
run in interface Runnable
public void processGauge(MetricName name,
GaugeMetric<?> gauge,
PrintStream stream)
processGauge in interface MetricsProcessor<PrintStream>
public void processCounter(MetricName name,
CounterMetric counter,
PrintStream stream)
processCounter in interface MetricsProcessor<PrintStream>
public void processMeter(MetricName name,
Metered meter,
PrintStream stream)
processMeter in interface MetricsProcessor<PrintStream>
public void processHistogram(MetricName name,
HistogramMetric histogram,
PrintStream stream)
processHistogram in interface MetricsProcessor<PrintStream>
public void processTimer(MetricName name,
TimerMetric timer,
PrintStream stream)
processTimer in interface MetricsProcessor<PrintStream>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||