public abstract class AbstractDistributionSummary extends AbstractMeter implements DistributionSummary
DistributionSummary.Builder
Meter.Id, Meter.Type
Modifier | Constructor and Description |
---|---|
protected |
AbstractDistributionSummary(Meter.Id id,
Clock clock,
DistributionStatisticConfig distributionStatisticConfig,
double scale) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
double |
histogramCountAtValue(long value)
Provides cumulative histogram counts.
|
double |
percentile(double percentile) |
void |
record(double amount)
Updates the statistics kept by the summary with the specified amount.
|
protected abstract void |
recordNonNegative(double amount) |
DistributionStatisticConfig |
statsConfig() |
HistogramSnapshot |
takeSnapshot(boolean supportsAggregablePercentiles)
Summary statistics should be published off of a single snapshot instance so that, for example, there isn't
disagreement between the distribution's count and total because more events continue to stream in.
|
getId
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
builder, count, max, mean, measure, totalAmount
protected AbstractDistributionSummary(Meter.Id id, Clock clock, DistributionStatisticConfig distributionStatisticConfig, double scale)
public final void record(double amount)
DistributionSummary
record
in interface DistributionSummary
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.protected abstract void recordNonNegative(double amount)
public double percentile(double percentile)
percentile
in interface DistributionSummary
percentile
- A percentile in the domain [0, 1]. For example, 0.5 represents the 50th percentile of the
distribution.public double histogramCountAtValue(long value)
DistributionSummary
histogramCountAtValue
in interface DistributionSummary
value
- The histogram bucket to retrieve a count for.public HistogramSnapshot takeSnapshot(boolean supportsAggregablePercentiles)
DistributionSummary
takeSnapshot
in interface DistributionSummary
supportsAggregablePercentiles
- Whether percentile histogram buckets should be included in the list of CountAtBucket
.public boolean equals(@Nullable java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public DistributionStatisticConfig statsConfig()