@BetaApi public class Distribution extends Object
0 (inclusive) to endValue (exclusive) and
computes their percentiles.
Methods may be called concurrently.
| Constructor and Description |
|---|
Distribution(int endValue) |
| Modifier and Type | Method and Description |
|---|---|
long |
getNthPercentile(double percentile)
Deprecated.
|
int |
getPercentile(double percentile)
Get the percentile of recorded values.
|
void |
record(int value)
Records a new value.
|
String |
toString() |
@Deprecated public long getNthPercentile(double percentile)
public int getPercentile(double percentile)
record(int), the
result is an approximate.public void record(int value)
The value must not be negative. To help with distributions with long tails, if the given
value is greater than or equal to endValue, the value endValue-1 is recorded
instead.