com.twitter.common.stats
Class PrintableHistogram

java.lang.Object
  extended by com.twitter.common.stats.PrintableHistogram

public class PrintableHistogram
extends Object


Constructor Summary
PrintableHistogram(double... buckets)
          Creates a histogram with the given bucket boundaries.
 
Method Summary
 void addValue(double value)
           
 void addValue(double value, int count)
           
 double getBucketRatio(int bucketId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrintableHistogram

public PrintableHistogram(double... buckets)
Creates a histogram with the given bucket boundaries. The boundaries 0 and infinity are implicitly added.

Parameters:
buckets - Boundaries for histogram buckets.
Method Detail

addValue

public void addValue(double value)

addValue

public void addValue(double value,
                     int count)

getBucketRatio

public double getBucketRatio(int bucketId)

toString

public String toString()
Overrides:
toString in class Object