net_instaweb::Histogram Class Reference

Inheritance diagram for net_instaweb::Histogram:
net_instaweb::NullHistogram net_instaweb::SharedMemHistogram

List of all members.

Public Member Functions

virtual void Add (double value)=0
 Record a value in its bucket.
virtual void Clear ()=0
 Throw away all data.
virtual bool Empty ()
 True if the histogram is empty.
virtual void Render (const StringPiece &title, Writer *writer, MessageHandler *handler)
virtual int MaxBuckets ()=0
virtual void EnableNegativeBuckets ()=0
 Allow histogram have negative values.
virtual void SetMinValue (double value)=0
 Set the minimum value allowed in histogram.
virtual void SetMaxValue (double value)=0
virtual void SetMaxBuckets (int i)=0
 Set the maximum number of buckets.
virtual double Average ()
 Record a value in its bucket.
virtual double Percentile (const double perc)
virtual double StandardDeviation ()
virtual double Count ()
virtual double Maximum ()
virtual double Minimum ()
virtual double Median ()

Protected Member Functions

virtual AbstractMutexlock ()=0
virtual double AverageInternal ()=0
virtual double PercentileInternal (const double perc)=0
virtual double StandardDeviationInternal ()=0
virtual double CountInternal ()=0
virtual double MaximumInternal ()=0
virtual double MinimumInternal ()=0
virtual double BucketStart (int index)=0
virtual double BucketLimit (int index)
 Upper bound of a bucket.
virtual double BucketCount (int index)=0
 Value of a bucket.
virtual void WriteRawHistogramData (Writer *writer, MessageHandler *handler)

Member Function Documentation

virtual double net_instaweb::Histogram::BucketStart ( int  index  )  [protected, pure virtual]

Lower bound of a bucket. If index == MaxBuckets() + 1, returns the upper bound of the histogram. DCHECK if index is in the range of [0, MaxBuckets()+1].

Implemented in net_instaweb::SharedMemHistogram, and net_instaweb::NullHistogram.

virtual int net_instaweb::Histogram::MaxBuckets (  )  [pure virtual]

Maxmum number of buckets. This number can be used to allocate a buffer for Histogram.

Implemented in net_instaweb::SharedMemHistogram, and net_instaweb::NullHistogram.

virtual double net_instaweb::Histogram::Percentile ( const double  perc  )  [inline, virtual]

Return estimated value that is greater than perc% of all data. e.g. Percentile(20) returns the value which is greater than 20% of data.

virtual void net_instaweb::Histogram::Render ( const StringPiece &  title,
Writer writer,
MessageHandler handler 
) [virtual]

Write Histogram Data to the writer. Default implementation does not include histogram graph, but only raw histogram data table. It looks like: ________________________________________ | TITLE String | | Avg: StdDev: Median: 90%: 95%: 99% | | Raw Histogram Data: | | [0,1] 1 25% 25% ||||| | | [2,3] 1 25% 50% ||||| | | [4,5] 2 50% 100% |||||||||| | |_______________________________________|

virtual void net_instaweb::Histogram::SetMaxValue ( double  value  )  [pure virtual]

Set the value upper-bound of a histogram, the value range in histogram is [MinValue, MaxValue) or (-MaxValue, MaxValue) if enabled negative buckets.

Implemented in net_instaweb::SharedMemHistogram, and net_instaweb::NullHistogram.

virtual void net_instaweb::Histogram::WriteRawHistogramData ( Writer writer,
MessageHandler handler 
) [protected, virtual]

Helper function of Render(), write entries of histogram raw data table. Each entry includes bucket range, bucket count, percentage, cumulative percentage, bar. It looks like: [0,1] 1 5% 5% |||| [2,3] 2 10% 15% ||||||||


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:34:19 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3