public class PercentileDistributionSummary extends java.lang.Object implements DistributionSummary
| Modifier and Type | Method and Description |
|---|---|
long |
count()
The number of times that record has been called since this timer was last reset.
|
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.
|
java.lang.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 last reset.
|
public static PercentileDistributionSummary get(Registry registry, Id id)
registry - Registry to use.id - Identifier for the metric being registered.public Id id()
Meterpublic java.lang.Iterable<Measurement> measure()
Meterpublic boolean hasExpired()
MeterhasExpired in interface Meterpublic void record(long amount)
DistributionSummaryrecord in interface DistributionSummaryamount - 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()
DistributionSummarycount in interface DistributionSummarypublic long totalAmount()
DistributionSummarytotalAmount in interface DistributionSummary