Base class for implementations of monitoring statistics. More...
#include "statistics.h"
Public Member Functions | |
virtual Variable * | AddVariable (const StringPiece &name)=0 |
virtual Variable * | FindVariable (const StringPiece &name) const =0 |
Find a variable from a name, returning NULL if not found. | |
Variable * | GetVariable (const StringPiece &name) const |
Find a variable from a name, aborting if not found. | |
virtual Histogram * | AddHistogram (const StringPiece &name)=0 |
virtual Histogram * | FindHistogram (const StringPiece &name) const =0 |
Find a histogram from a name, returning NULL if not found. | |
Histogram * | GetHistogram (const StringPiece &name) const |
Find a histogram from a name, aborting if not found. | |
virtual TimedVariable * | AddTimedVariable (const StringPiece &name, const StringPiece &group)=0 |
virtual TimedVariable * | FindTimedVariable (const StringPiece &name) const =0 |
Find a TimedVariable from a name, returning NULL if not found. | |
TimedVariable * | GetTimedVariable (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 | 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 |
Protected Member Functions | |
FakeTimedVariable * | NewFakeTimedVariable (const StringPiece &name, int index) |
A helper for subclasses that do not fully implement timed variables. |
Base class for implementations of monitoring statistics.
virtual Histogram* net_instaweb::Statistics::AddHistogram | ( | const StringPiece & | name | ) | [pure virtual] |
Add a new histogram, or returns an existing one of that name. The Histogram* is owned by the Statistics class -- it should not be deleted by the caller.
Implemented in net_instaweb::StatisticsTemplate< Var, Hist, TimedVar >, net_instaweb::StatisticsTemplate< SimpleStatsVariable, NullHistogram, FakeTimedVariable >, net_instaweb::StatisticsTemplate< SharedMemVariable, SharedMemHistogram, FakeTimedVariable >, net_instaweb::StatisticsTemplate< NullStatisticsVariable, NullHistogram, FakeTimedVariable >, and net_instaweb::StatisticsTemplate< Var, NullHistogram, FakeTimedVariable >.
virtual TimedVariable* net_instaweb::Statistics::AddTimedVariable | ( | const StringPiece & | name, | |
const StringPiece & | group | |||
) | [pure virtual] |
Add a new TimedVariable, or returns an existing one of that name. The TimedVariable* is owned by the Statistics class -- it should not be deleted by the caller. Each stat belongs to a group, such as "Statistics", "Disk Statistics", etc.
Implemented in net_instaweb::StatisticsTemplate< Var, Hist, TimedVar >, net_instaweb::StatisticsTemplate< SimpleStatsVariable, NullHistogram, FakeTimedVariable >, net_instaweb::StatisticsTemplate< SharedMemVariable, SharedMemHistogram, FakeTimedVariable >, net_instaweb::StatisticsTemplate< NullStatisticsVariable, NullHistogram, FakeTimedVariable >, and net_instaweb::StatisticsTemplate< Var, NullHistogram, FakeTimedVariable >.
virtual Variable* net_instaweb::Statistics::AddVariable | ( | const StringPiece & | name | ) | [pure virtual] |
Add a new variable, or returns an existing one of that name. The Variable* is owned by the Statistics class -- it should not be deleted by the caller.
Implemented in net_instaweb::StatisticsTemplate< Var, Hist, TimedVar >, net_instaweb::StatisticsTemplate< SimpleStatsVariable, NullHistogram, FakeTimedVariable >, net_instaweb::StatisticsTemplate< SharedMemVariable, SharedMemHistogram, FakeTimedVariable >, net_instaweb::StatisticsTemplate< NullStatisticsVariable, NullHistogram, FakeTimedVariable >, and net_instaweb::StatisticsTemplate< Var, NullHistogram, FakeTimedVariable >.
virtual void net_instaweb::Statistics::Clear | ( | ) | [pure virtual] |
Set all variables to 0. Throw away all data in histograms and stats.
Implemented in net_instaweb::StatisticsTemplate< Var, Hist, TimedVar >, net_instaweb::StatisticsTemplate< SimpleStatsVariable, NullHistogram, FakeTimedVariable >, net_instaweb::StatisticsTemplate< SharedMemVariable, SharedMemHistogram, FakeTimedVariable >, net_instaweb::StatisticsTemplate< NullStatisticsVariable, NullHistogram, FakeTimedVariable >, and net_instaweb::StatisticsTemplate< Var, NullHistogram, FakeTimedVariable >.
virtual void net_instaweb::Statistics::RenderTimedVariables | ( | Writer * | writer, | |
MessageHandler * | handler | |||
) | [virtual] |
Export statistics to a writer. Statistics in a group are exported in one table.