Interface DistributionSummary
Records a distribution of samples (e.g., sizes of responses returned by a server), each with a
long value, and
reports statistics over all samples (count, total, mean, max) as well as grouping samples using percentiles or bucket
boundaries.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface Meter
Meter.BaseUnits, Meter.Id, Meter.Scope, Meter.TypeModifier and TypeInterfaceDescriptionstatic classCommon unit declarations (inspired by the list from MicroProfile metrics).static interfaceUnique idenfier for a meter.static classDeprecated, for removal: This API element is subject to removal in a future version.Core metrics ignores scope values, and this type will be removed.static enumType of meter. -
Method Summary
Modifier and TypeMethodDescriptionstatic DistributionSummary.BuilderDeprecated, for removal: This API element is subject to removal in a future version.this method uses service registry to get aMetricsFactoryinstance, which may be inefficient, useMetricsFactory.distributionSummaryBuilder(String, io.helidon.metrics.api.DistributionStatisticsConfig.Builder)insteadstatic DistributionSummary.Builderbuilder(String name, DistributionStatisticsConfig.Builder configBuilder) Deprecated, for removal: This API element is subject to removal in a future version.this method uses service registry to get aMetricsFactoryinstance, which may be inefficient, useMetricsFactory.distributionSummaryBuilder(String, io.helidon.metrics.api.DistributionStatisticsConfig.Builder)insteadlongcount()Returns the current count of observations in the distribution summary.doublemax()Returns the maximum value among the observations recorded by the distribution summary.doublemean()Returns the mean of the observations recorded by the distribution summary.voidrecord(double amount) Updates the statistics kept by the summary with the specified amount.snapshot()Returns aHistogramSnapshotof the current state of the distribution summary.doubleReturns the total of the observations recorded by the distribution summary.Methods inherited from interface Meter
baseUnit, description, id, scope, typeModifier and TypeMethodDescriptionbaseUnit()Returns the meter's base unit.Returns the meter's description.id()Returns the meter ID.scope()Deprecated, for removal: This API element is subject to removal in a future version.Core metrics does not assign scopes, and this method will be removed.type()Returns the meter type.
-
Method Details
-
builder
@Deprecated(forRemoval=true, since="27.0.0") static DistributionSummary.Builder builder(String name, DistributionStatisticsConfig.Builder configBuilder) Deprecated, for removal: This API element is subject to removal in a future version.this method uses service registry to get aMetricsFactoryinstance, which may be inefficient, useMetricsFactory.distributionSummaryBuilder(String, io.helidon.metrics.api.DistributionStatisticsConfig.Builder)insteadCreates a builder for a newDistributionSummaryusing the specified statistics builder.- Parameters:
name- name for the summaryconfigBuilder- distribution stats config for the summary- Returns:
- new builder
-
builder
@Deprecated(forRemoval=true, since="27.0.0") static DistributionSummary.Builder builder(String name) Deprecated, for removal: This API element is subject to removal in a future version.this method uses service registry to get aMetricsFactoryinstance, which may be inefficient, useMetricsFactory.distributionSummaryBuilder(String, io.helidon.metrics.api.DistributionStatisticsConfig.Builder)insteadCreates a builder for a newDistributionSummaryusing default distribution statistics.- Parameters:
name- name for the summary- Returns:
- new builder
-
record
void record(double amount) Updates the statistics kept by the summary with the specified amount.- Parameters:
amount- Amount for an event being measured. For example, if the size in bytes of responses from a server. If the amount is less than 0 the value will be dropped.
-
count
long count()Returns the current count of observations in the distribution summary.- Returns:
- number of observations recorded in the summary
-
totalAmount
double totalAmount()Returns the total of the observations recorded by the distribution summary.- Returns:
- total across all recorded events
-
mean
double mean()Returns the mean of the observations recorded by the distribution summary.- Returns:
- average value of events recorded in the summary
-
max
double max()Returns the maximum value among the observations recorded by the distribution summary.- Returns:
- maximum value of recorded events
-
snapshot
HistogramSnapshot snapshot()Returns aHistogramSnapshotof the current state of the distribution summary.- Returns:
- snapshot
-