Class Distribution

java.lang.Object
com.google.api.gax.core.Distribution

public class Distribution extends Object
Distribution records values from 0 (inclusive) to endValue (exclusive) and computes their percentiles.

Methods may be called concurrently.

  • Constructor Details

    • Distribution

      public Distribution(int endValue)
  • Method Details

    • getNthPercentile

      @Deprecated public long getNthPercentile(double percentile)
      Deprecated.
    • getPercentile

      public int getPercentile(double percentile)
      Get the percentile of recorded values. If called concurrently with record(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 value endValue-1 is recorded instead.

    • toString

      public String toString()
      Overrides:
      toString in class Object