public static class ConsoleReporter.Builder
extends java.lang.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(java.util.concurrent.TimeUnit durationUnit)
Convert durations to the given time unit.
|
ConsoleReporter.Builder |
convertRatesTo(java.util.concurrent.TimeUnit rateUnit)
Convert rates to the given time unit.
|
ConsoleReporter.Builder |
disabledMetricAttributes(java.util.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(java.util.Locale locale)
Format numbers for the given
Locale. |
ConsoleReporter.Builder |
formattedFor(java.util.TimeZone timeZone)
Use the given
TimeZone for the time. |
ConsoleReporter.Builder |
outputTo(java.io.PrintStream output)
Write to the given
PrintStream. |
ConsoleReporter.Builder |
scheduleOn(java.util.concurrent.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(java.util.concurrent.ScheduledExecutorService executor)
executor - the executor to use while scheduling reporting of metrics.thispublic ConsoleReporter.Builder outputTo(java.io.PrintStream output)
PrintStream.output - a PrintStream instance.thispublic ConsoleReporter.Builder formattedFor(java.util.Locale locale)
Locale.locale - a Localethispublic ConsoleReporter.Builder withClock(Clock clock)
Clock instance for the time.clock - a Clock instancethispublic ConsoleReporter.Builder formattedFor(java.util.TimeZone timeZone)
TimeZone for the time.timeZone - a TimeZonethispublic ConsoleReporter.Builder convertRatesTo(java.util.concurrent.TimeUnit rateUnit)
rateUnit - a unit of timethispublic ConsoleReporter.Builder convertDurationsTo(java.util.concurrent.TimeUnit durationUnit)
durationUnit - a unit of timethispublic ConsoleReporter.Builder filter(MetricFilter filter)
filter - a MetricFilterthispublic ConsoleReporter.Builder disabledMetricAttributes(java.util.Set<MetricAttribute> disabledMetricAttributes)
MetricAttribute.disabledMetricAttributes - a MetricFilterthispublic ConsoleReporter build()
ConsoleReporter with the given properties.ConsoleReporter"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"