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

Public Member Functions

 SharedMemHistogram (StringPiece name, Statistics *stats)
 
virtual void Add (double value)
 Record a value in its bucket.
 
virtual void Clear ()
 Throw away all data.
 
virtual int NumBuckets ()
 Returns number of buckets the histogram actually has.
 
virtual void EnableNegativeBuckets ()
 
virtual void SetMinValue (double value)
 Set the minimum value allowed in histogram.
 
virtual void SetMaxValue (double value)
 
virtual void SetSuggestedNumBuckets (int i)
 
size_t AllocationSize (AbstractSharedMem *shm_runtime)
 
- Public Member Functions inherited from net_instaweb::Histogram
bool Empty ()
 True if the histogram is empty.
 
virtual void Render (int index, Writer *writer, MessageHandler *handler)
 
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)
 
virtual double BucketLimit (int index)
 Upper bound of a bucket.
 

Protected Member Functions

virtual AbstractMutexlock ()
 
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 double BucketStart (int index)
 
virtual double BucketCount (int index)
 Value of a bucket.
 
- Protected Member Functions inherited from net_instaweb::Histogram
void WriteRawHistogramData (Writer *writer, MessageHandler *handler)
 

Friends

class SharedMemStatistics
 

Member Function Documentation

size_t net_instaweb::SharedMemHistogram::AllocationSize ( AbstractSharedMem shm_runtime)
inline

Return the amount of shared memory this Histogram objects needs for its use.

Shared memory space should include a mutex, HistogramBody and the storage for the actual buckets.

virtual double net_instaweb::SharedMemHistogram::BucketStart ( int  index)
protectedvirtual

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::SharedMemHistogram::EnableNegativeBuckets ( )
virtual

Call the following functions after statistics->Init and before add values. EnableNegativeBuckets, SetMinValue and SetMaxValue will cause resetting Histogram.

Implements net_instaweb::Histogram.

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

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

Implements net_instaweb::Histogram.

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

We rely on NumBuckets to allocate a memory segment for the histogram, so this should be called right after AddHistogram() in the ::Initialize process. Similarly, all the bounds must be initialized at that point, to avoid clearing the histogram as new child processes attach to it.

Implements net_instaweb::Histogram.


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