public static class ConsoleReporter.Builder extends Object
ConsoleReporter instances. Defaults to using the default locale and
time zone, writing to System.out, converting rates to events/second, converting
durations to milliseconds, and not filtering metrics.| Modifier and Type | Method and Description |
|---|---|
ConsoleReporter |
build()
Builds a
ConsoleReporter with the given properties. |
ConsoleReporter.Builder |
convertDurationsTo(TimeUnit durationUnit)
Convert durations to the given time unit.
|
ConsoleReporter.Builder |
convertRatesTo(TimeUnit rateUnit)
Convert rates to the given time unit.
|
ConsoleReporter.Builder |
disabledMetricAttributes(Set<MetricAttribute> disabledMetricAttributes)
Don't report the passed metric attributes for all metrics (e.g.
|
ConsoleReporter.Builder |
filter(MetricFilter filter)
Only report metrics which match the given filter.
|
ConsoleReporter.Builder |
formattedFor(Locale locale)
Format numbers for the given
Locale. |
ConsoleReporter.Builder |
formattedFor(TimeZone timeZone)
Use the given
TimeZone for the time. |
ConsoleReporter.Builder |
outputTo(PrintStream output)
Write to the given
PrintStream. |
ConsoleReporter.Builder |
scheduleOn(ScheduledExecutorService executor)
Specifies the executor to use while scheduling reporting of metrics.
|
ConsoleReporter.Builder |
shutdownExecutorOnStop(boolean shutdownExecutorOnStop)
Specifies whether or not, the executor (used for reporting) will be stopped with same time with reporter.
|
ConsoleReporter.Builder |
withClock(Clock clock)
Use the given
Clock instance for the time. |
public ConsoleReporter.Builder shutdownExecutorOnStop(boolean shutdownExecutorOnStop)
scheduleOn(ScheduledExecutorService).shutdownExecutorOnStop - if true, then executor will be stopped in same time with this reporterthispublic ConsoleReporter.Builder scheduleOn(ScheduledExecutorService executor)
executor - the executor to use while scheduling reporting of metrics.thispublic ConsoleReporter.Builder outputTo(PrintStream output)
PrintStream.output - a PrintStream instance.thispublic ConsoleReporter.Builder formattedFor(Locale locale)
Locale.locale - a Localethispublic ConsoleReporter.Builder withClock(Clock clock)
Clock instance for the time.clock - a Clock instancethispublic ConsoleReporter.Builder formattedFor(TimeZone timeZone)
TimeZone for the time.timeZone - a TimeZonethispublic ConsoleReporter.Builder convertRatesTo(TimeUnit rateUnit)
rateUnit - a unit of timethispublic ConsoleReporter.Builder convertDurationsTo(TimeUnit durationUnit)
durationUnit - a unit of timethispublic ConsoleReporter.Builder filter(MetricFilter filter)
filter - a MetricFilterthispublic ConsoleReporter.Builder disabledMetricAttributes(Set<MetricAttribute> disabledMetricAttributes)
MetricAttribute.disabledMetricAttributes - a MetricFilterthispublic ConsoleReporter build()
ConsoleReporter with the given properties.ConsoleReporterCopyright © 2011. All rights reserved.