Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | List of all members
net_instaweb::Statistics Class Referenceabstract

Base class for implementations of monitoring statistics. More...

#include "statistics.h"

Inheritance diagram for net_instaweb::Statistics:
net_instaweb::StatisticsTemplate< Var, UpDown, Hist, TimedVar > net_instaweb::StatisticsTemplate< SplitVariable, SplitUpDownCounter, SplitHistogram, SplitTimedVariable > net_instaweb::StatisticsTemplate< VarTemplate< Impl >, UpDownTemplate< Impl >, HistC, TVarC > net_instaweb::StatisticsTemplate< VarTemplate< NullStatisticsVariable >, UpDownTemplate< NullStatisticsVariable >, CountHistogram, FakeTimedVariable > net_instaweb::StatisticsTemplate< VarTemplate< SharedMemVariable >, UpDownTemplate< SharedMemVariable >, SharedMemHistogram, FakeTimedVariable > net_instaweb::StatisticsTemplate< VarTemplate< SimpleStatsVariable >, UpDownTemplate< SimpleStatsVariable >, CountHistogram, FakeTimedVariable > net_instaweb::SplitStatistics net_instaweb::ScalarStatisticsTemplate< Impl, HistC, TVarC > net_instaweb::ScalarStatisticsTemplate< NullStatisticsVariable > net_instaweb::ScalarStatisticsTemplate< SharedMemVariable, SharedMemHistogram, FakeTimedVariable > net_instaweb::ScalarStatisticsTemplate< SimpleStatsVariable > net_instaweb::NullStatistics net_instaweb::SharedMemStatistics net_instaweb::SimpleStats

Public Member Functions

virtual UpDownCounterAddUpDownCounter (const StringPiece &name)=0
 
virtual UpDownCounterAddGlobalUpDownCounter (const StringPiece &name)
 
virtual UpDownCounterFindUpDownCounter (const StringPiece &name) const =0
 Find a variable from a name, returning NULL if not found.
 
UpDownCounterGetUpDownCounter (const StringPiece &name) const
 Find a variable from a name, aborting if not found.
 
virtual VariableAddVariable (const StringPiece &name)=0
 
virtual VariableFindVariable (const StringPiece &name) const =0
 Find a variable from a name, returning NULL if not found.
 
VariableGetVariable (const StringPiece &name) const
 Find a variable from a name, aborting if not found.
 
virtual HistogramAddHistogram (const StringPiece &name)=0
 
virtual HistogramFindHistogram (const StringPiece &name) const =0
 Find a histogram from a name, returning NULL if not found.
 
HistogramGetHistogram (const StringPiece &name) const
 Find a histogram from a name, aborting if not found.
 
virtual TimedVariableAddTimedVariable (const StringPiece &name, const StringPiece &group)=0
 
virtual TimedVariableFindTimedVariable (const StringPiece &name) const =0
 Find a TimedVariable from a name, returning NULL if not found.
 
TimedVariableGetTimedVariable (const StringPiece &name) const
 Find a TimedVariable from a name, aborting if not found.
 
virtual const StringVector & HistogramNames ()=0
 Return the names of all the histograms for render.
 
virtual const std::map
< GoogleString, StringVector > & 
TimedVariableMap ()=0
 Return the map of groupnames and names of all timedvariables for render.
 
virtual void Dump (Writer *writer, MessageHandler *handler)=0
 Dump the variable-values to a writer.
 
virtual void DumpJson (Writer *writer, MessageHandler *message_handler)=0
 Dump the variable-values in JSON format to a writer.
 
virtual void RenderTimedVariables (Writer *writer, MessageHandler *handler)
 
virtual void RenderHistograms (Writer *writer, MessageHandler *handler)
 Write all the histograms in this Statistic object to a writer.
 
virtual void Clear ()=0
 
virtual StatisticsLoggerconsole_logger ()
 
int64 LookupValue (StringPiece stat_name)
 

Static Public Attributes

static const char kDefaultGroup []
 Default group for use with AddTimedVariable.
 

Detailed Description

Base class for implementations of monitoring statistics.

Member Function Documentation

virtual UpDownCounter* net_instaweb::Statistics::AddGlobalUpDownCounter ( const StringPiece &  name)
virtual
virtual Histogram* net_instaweb::Statistics::AddHistogram ( const StringPiece &  name)
pure virtual
virtual TimedVariable* net_instaweb::Statistics::AddTimedVariable ( const StringPiece &  name,
const StringPiece &  group 
)
pure virtual
virtual UpDownCounter* net_instaweb::Statistics::AddUpDownCounter ( const StringPiece &  name)
pure virtual
virtual Variable* net_instaweb::Statistics::AddVariable ( const StringPiece &  name)
pure virtual
virtual void net_instaweb::Statistics::Clear ( )
pure virtual
virtual StatisticsLogger* net_instaweb::Statistics::console_logger ( )
inlinevirtual

This is implemented as NULL here because most Statistics don't need it. In the context in which it is needed we only have access to a Statistics*, rather than the specific subclass, hence its being here. Return the StatisticsLogger associated with this Statistics.

Reimplemented in net_instaweb::SharedMemStatistics, and net_instaweb::SplitStatistics.

int64 net_instaweb::Statistics::LookupValue ( StringPiece  stat_name)

Testing helper method to look up a statistics numeric value by name. Please do not use this in production code. This finds the current value whether it is stored in a Variable, UpDownCounter, or TimedVariable.

If the statistics is not found, the program check-fails.


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