public class PercentileDistributionSummary extends Object implements DistributionSummary
Modifier and Type | Method and Description |
---|---|
long |
count()
The number of times that record has been called since this timer was created.
|
static PercentileDistributionSummary |
get(Registry registry,
Id id)
Creates a distribution summary object that can be used for estimating percentiles.
|
boolean |
hasExpired()
Indicates whether the meter is expired.
|
Id |
id()
Identifier used to lookup this meter in the registry.
|
Iterable<Measurement> |
measure()
Get the set of measurements for this meter.
|
double |
percentile(double p)
Computes the specified percentile for this distribution summary.
|
void |
record(long amount)
Updates the statistics kept by the summary with the specified amount.
|
long |
totalAmount()
The total amount of all recorded events since this summary was created.
|
public static PercentileDistributionSummary get(Registry registry, Id id)
registry
- Registry to use.id
- Identifier for the metric being registered.public Id id()
Meter
public Iterable<Measurement> measure()
Meter
public boolean hasExpired()
Meter
hasExpired
in interface Meter
public void record(long 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.public double percentile(double p)
p
- Percentile to compute, value must be 0.0 <= p <= 100.0
.p
`th percentile in seconds.public long count()
DistributionSummary
count
in interface DistributionSummary
public long totalAmount()
DistributionSummary
totalAmount
in interface DistributionSummary