Package com.google.api.gax.core
Class Distribution
- java.lang.Object
-
- com.google.api.gax.core.Distribution
-
public class Distribution extends java.lang.ObjectDistribution records values from0(inclusive) toendValue(exclusive) and computes their percentiles.Methods may be called concurrently.
-
-
Constructor Summary
Constructors Constructor Description Distribution(int endValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description longgetNthPercentile(double percentile)Deprecated.intgetPercentile(double percentile)Get the percentile of recorded values.voidrecord(int value)Records a new value.java.lang.StringtoString()
-
-
-
Method Detail
-
getNthPercentile
@Deprecated public long getNthPercentile(double percentile)
Deprecated.
-
getPercentile
public int getPercentile(double percentile)
Get the percentile of recorded values. If called concurrently withrecord(int), the result is an approximate.
-
record
public void record(int value)
Records a new 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 valueendValue-1is recorded instead.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-