public static class DropwizardMetricStrategy.Builder extends Object
| Constructor and Description |
|---|
Builder(com.codahale.metrics.MetricRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
DropwizardMetricStrategy |
build() |
DropwizardMetricStrategy.Builder |
maxNumberOfMetrics(int value)
Sets the maximum number of metrics allowed in the underlying Codahale
registry. |
DropwizardMetricStrategy.Builder |
reservoirSize(int value)
Sets the reservoir size used for calculating statistics for timers and histograms.
|
public Builder(@Nonnull com.codahale.metrics.MetricRegistry registry)
@Nonnull public DropwizardMetricStrategy build()
@Nonnull public DropwizardMetricStrategy.Builder maxNumberOfMetrics(int value)
registry. The
strategy will not add new metrics to the registry when the registry contains the maximum number of allowed
metrics, or more. This can be used to limit the amount of memory used for metrics. Using the default
settings, expect about 250kb of memory usage per timer.
The default value is 128 (which translates to about 32MB of memory).value - the maximum number of metrics that can be created by the strategy@Nonnull public DropwizardMetricStrategy.Builder reservoirSize(int value)
value - the reservoir size to useCopyright © 2019 Atlassian. All rights reserved.