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 reporterthis
public CsvReporter.Builder scheduleOn(ScheduledExecutorService executor)
executor
- the executor to use while scheduling reporting of metrics.this
public CsvReporter.Builder formatFor(Locale locale)
Locale
.locale
- a Locale
this
public CsvReporter.Builder convertRatesTo(TimeUnit rateUnit)
rateUnit
- a unit of timethis
public CsvReporter.Builder convertDurationsTo(TimeUnit durationUnit)
durationUnit
- a unit of timethis
public CsvReporter.Builder withSeparator(String separator)
separator
- the string to use for the separator.this
public CsvReporter.Builder withClock(Clock clock)
Clock
instance for the time.clock
- a Clock
instancethis
public CsvReporter.Builder filter(MetricFilter filter)
filter
- a MetricFilter
this
public 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 createdCsvReporter
Copyright © 2018. All Rights Reserved.