Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
net_instaweb::SplitHistogram Class Reference

#include "split_statistics.h"

Inheritance diagram for net_instaweb::SplitHistogram:

Public Member Functions

 SplitHistogram (ThreadSystem *thread_system, Histogram *rw, Histogram *w)
virtual void Add (double value)
virtual void Clear ()
 Throw away all data.
virtual void Render (int index, Writer *writer, MessageHandler *handler)
virtual int NumBuckets ()
 Returns number of buckets the histogram actually has.
virtual void EnableNegativeBuckets ()
 Allow histogram have negative values.
virtual void SetMinValue (double value)
 Set the minimum value allowed in histogram.
virtual void SetMaxValue (double value)
virtual void SetSuggestedNumBuckets (int i)
virtual double BucketStart (int index)
virtual double BucketLimit (int index)
 Upper bound of a bucket.
virtual double BucketCount (int index)
 Value of a bucket.
- Public Member Functions inherited from net_instaweb::Histogram
bool Empty ()
 True if the histogram is empty.
double Average ()
 Returns average of the values added.
double Percentile (const double perc)
double StandardDeviation ()
double Count ()
double Maximum ()
double Minimum ()
double Median ()
GoogleString HtmlTableRow (const GoogleString &title, int index)

Protected Member Functions

virtual double AverageInternal ()
 Note that these *Internal interfaces require the mutex to be held.
virtual double PercentileInternal (const double perc)
virtual double StandardDeviationInternal ()
virtual double CountInternal ()
virtual double MaximumInternal ()
virtual double MinimumInternal ()
virtual AbstractMutexlock ()
- Protected Member Functions inherited from net_instaweb::Histogram
void WriteRawHistogramData (Writer *writer, MessageHandler *handler)

Detailed Description

A histogram that forwards writes to two other Histogram objects, but reads only from one.

Constructor & Destructor Documentation

net_instaweb::SplitHistogram::SplitHistogram ( ThreadSystem thread_system,
Histogram rw,
Histogram w 

Histogram 'rw' will be used to read and write, histogram 'w' will be used for writes only. Does not take ownership of either 'rw' or 'w'. 'rw' and 'w' must be non-NULL.

Member Function Documentation

virtual void net_instaweb::SplitHistogram::Add ( double  value)

Reimplementation of the histogram API. See the base class for method descriptions.

Implements net_instaweb::Histogram.

virtual double net_instaweb::SplitHistogram::BucketStart ( int  index)

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

Implements net_instaweb::Histogram.

virtual void net_instaweb::SplitHistogram::Render ( int  index,
Writer writer,
MessageHandler handler 

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% |||||||||| | |_______________________________________|

Reimplemented from net_instaweb::Histogram.

virtual void net_instaweb::SplitHistogram::SetMaxValue ( double  value)

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

Implements net_instaweb::Histogram.

virtual void net_instaweb::SplitHistogram::SetSuggestedNumBuckets ( int  i)

Set the suggested number of buckets for the histogram. The implementation may chose to use a somewhat different number.

Implements net_instaweb::Histogram.

The documentation for this class was generated from the following file: