public static class CsvReporter.Builder extends Object
CsvReporter instances. Defaults to using the default locale, converting
rates to events/second, converting durations to milliseconds, and not filtering metrics.| Modifier and Type | Method and Description |
|---|---|
CsvReporter |
build(File directory)
Builds a
CsvReporter with the given properties, writing .csv files to the
given directory. |
CsvReporter.Builder |
convertDurationsTo(TimeUnit durationUnit)
Convert durations to the given time unit.
|
CsvReporter.Builder |
convertRatesTo(TimeUnit rateUnit)
Convert rates to the given time unit.
|
CsvReporter.Builder |
filter(MetricFilter filter)
Only report metrics which match the given filter.
|
CsvReporter.Builder |
formatFor(Locale locale)
Format numbers for the given
Locale. |
CsvReporter.Builder |
scheduleOn(ScheduledExecutorService executor)
Specifies the executor to use while scheduling reporting of metrics.
|
CsvReporter.Builder |
shutdownExecutorOnStop(boolean shutdownExecutorOnStop)
Specifies whether or not, the executor (used for reporting) will be stopped with same time with reporter.
|
CsvReporter.Builder |
withClock(Clock clock)
Use the given
Clock instance for the time. |
CsvReporter.Builder |
withCsvFileProvider(CsvFileProvider csvFileProvider) |
CsvReporter.Builder |
withSeparator(String separator)
Use the given string to use as the separator for values.
|
public CsvReporter.Builder shutdownExecutorOnStop(boolean shutdownExecutorOnStop)
scheduleOn(ScheduledExecutorService).shutdownExecutorOnStop - if true, then executor will be stopped in same time with this reporterthispublic CsvReporter.Builder scheduleOn(ScheduledExecutorService executor)
executor - the executor to use while scheduling reporting of metrics.thispublic CsvReporter.Builder formatFor(Locale locale)
Locale.locale - a Localethispublic CsvReporter.Builder convertRatesTo(TimeUnit rateUnit)
rateUnit - a unit of timethispublic CsvReporter.Builder convertDurationsTo(TimeUnit durationUnit)
durationUnit - a unit of timethispublic CsvReporter.Builder withSeparator(String separator)
separator - the string to use for the separator.thispublic CsvReporter.Builder withClock(Clock clock)
Clock instance for the time.clock - a Clock instancethispublic CsvReporter.Builder filter(MetricFilter filter)
filter - a MetricFilterthispublic CsvReporter.Builder withCsvFileProvider(CsvFileProvider csvFileProvider)
public CsvReporter build(File directory)
CsvReporter with the given properties, writing .csv files to the
given directory.directory - the directory in which the .csv files will be createdCsvReporterCopyright © 2021. All rights reserved.