|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.metrics.codahale_metrics.metrics.reporting.AbstractReporter
com.espertech.esper.metrics.codahale_metrics.metrics.reporting.AbstractPollingReporter
com.espertech.esper.metrics.codahale_metrics.metrics.reporting.ConsoleReporter
public class ConsoleReporter
A simple reporters which prints out application metrics to a PrintStream
periodically.
Constructor Summary | |
---|---|
ConsoleReporter(MetricsRegistry metricsRegistry,
java.io.PrintStream out,
MetricPredicate predicate)
Creates a new ConsoleReporter for a given metrics registry. |
|
ConsoleReporter(MetricsRegistry metricsRegistry,
java.io.PrintStream out,
MetricPredicate predicate,
Clock clock,
java.util.TimeZone timeZone)
Creates a new ConsoleReporter for a given metrics registry. |
|
ConsoleReporter(MetricsRegistry metricsRegistry,
java.io.PrintStream out,
MetricPredicate predicate,
Clock clock,
java.util.TimeZone timeZone,
java.util.Locale locale)
Creates a new ConsoleReporter for a given metrics registry. |
|
ConsoleReporter(java.io.PrintStream out)
Creates a new ConsoleReporter for the default metrics registry, with unrestricted
output. |
Method Summary | |
---|---|
static void |
enable(long period,
java.util.concurrent.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,
java.util.concurrent.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,
java.io.PrintStream stream)
Process the given counter. |
void |
processGauge(MetricName name,
Gauge<?> gauge,
java.io.PrintStream stream)
Process the given gauge. |
void |
processHistogram(MetricName name,
Histogram histogram,
java.io.PrintStream stream)
Process the given histogram. |
void |
processMeter(MetricName name,
Metered meter,
java.io.PrintStream stream)
Process the given Metered instance. |
void |
processTimer(MetricName name,
Timer timer,
java.io.PrintStream stream)
Process the given timer. |
void |
run()
The method called when a a poll is scheduled to occur. |
Methods inherited from class com.espertech.esper.metrics.codahale_metrics.metrics.reporting.AbstractPollingReporter |
---|
shutdown, shutdown, start |
Methods inherited from class com.espertech.esper.metrics.codahale_metrics.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(java.io.PrintStream out)
ConsoleReporter
for the default metrics registry, with unrestricted
output.
out
- the PrintStream
to which output will be writtenpublic ConsoleReporter(MetricsRegistry metricsRegistry, java.io.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
outputpublic ConsoleReporter(MetricsRegistry metricsRegistry, java.io.PrintStream out, MetricPredicate predicate, Clock clock, java.util.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 timepublic ConsoleReporter(MetricsRegistry metricsRegistry, java.io.PrintStream out, MetricPredicate predicate, Clock clock, java.util.TimeZone timeZone, java.util.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 valuesMethod Detail |
---|
public static void enable(long period, java.util.concurrent.TimeUnit unit)
period
- the period between successive outputsunit
- the time unit of period
public static void enable(MetricsRegistry metricsRegistry, long period, java.util.concurrent.TimeUnit unit)
metricsRegistry
- the metrics registryperiod
- the period between successive outputsunit
- the time unit of period
public void run()
AbstractPollingReporter
run
in interface java.lang.Runnable
run
in class AbstractPollingReporter
public void processGauge(MetricName name, Gauge<?> gauge, java.io.PrintStream stream)
MetricProcessor
processGauge
in interface MetricProcessor<java.io.PrintStream>
name
- the name of the gaugegauge
- the gaugestream
- the context of the meterpublic void processCounter(MetricName name, Counter counter, java.io.PrintStream stream)
MetricProcessor
processCounter
in interface MetricProcessor<java.io.PrintStream>
name
- the name of the countercounter
- the counterstream
- the context of the meterpublic void processMeter(MetricName name, Metered meter, java.io.PrintStream stream)
MetricProcessor
Metered
instance.
processMeter
in interface MetricProcessor<java.io.PrintStream>
name
- the name of the metermeter
- the meterstream
- the context of the meterpublic void processHistogram(MetricName name, Histogram histogram, java.io.PrintStream stream)
MetricProcessor
processHistogram
in interface MetricProcessor<java.io.PrintStream>
name
- the name of the histogramhistogram
- the histogramstream
- the context of the meterpublic void processTimer(MetricName name, Timer timer, java.io.PrintStream stream)
MetricProcessor
processTimer
in interface MetricProcessor<java.io.PrintStream>
name
- the name of the timertimer
- the timerstream
- the context of the meter
|
© 2006-2016 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |