Page Speed Optimization Libraries  1.4.26.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
net_instaweb::SharedMemStatistics Class Reference
Inheritance diagram for net_instaweb::SharedMemStatistics:
net_instaweb::StatisticsTemplate< SharedMemVariable, SharedMemHistogram, FakeTimedVariable > net_instaweb::Statistics

List of all members.

Public Member Functions

 SharedMemStatistics (int64 logging_interval_ms, const StringPiece &logging_file, bool logging, const GoogleString &filename_prefix, AbstractSharedMem *shm_runtime, MessageHandler *message_handler, FileSystem *file_system, Timer *timer)
void Init (bool parent, MessageHandler *message_handler)
void GlobalCleanup (MessageHandler *message_handler)
ConsoleStatisticsLoggerconsole_logger () const
virtual void DumpConsoleVarsToWriter (int64 current_time_ms, Writer *writer, MessageHandler *message_handler)
bool IsIgnoredVariable (const GoogleString &var_name)

Protected Member Functions

virtual SharedMemVariableNewVariable (const StringPiece &name, int index)
 Interface to subclass.
virtual SharedMemHistogramNewHistogram (const StringPiece &name)
virtual FakeTimedVariableNewTimedVariable (const StringPiece &name, int index)

Member Function Documentation

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 ConsoleStatisticsLogger associated with this Statistics.

Reimplemented from net_instaweb::Statistics.

virtual void net_instaweb::SharedMemStatistics::DumpConsoleVarsToWriter ( int64  current_time_ms,
Writer writer,
MessageHandler message_handler 
) [virtual]

Export statistics to a writer. Statistics in a group are exported in one table. This only exports console-related variables, as opposed to all variables, as the above does. Empty implementation because most Statistics don't need this. It's here because in the context in which it is needed we only have access to a Statistics*, rather than the specific subclass. current_time_ms: the time at which the dump was triggered

Reimplemented from net_instaweb::Statistics.

This should be called from the root process as it is about to exit, when no further children are expected to start.

void net_instaweb::SharedMemStatistics::Init ( bool  parent,
MessageHandler message_handler 
)

This method initializes or attaches to shared memory. You should call this exactly once in each process/thread, after all calls to AddVariables, AddHistograms and SetSuggestedNumBuckets (as well as any other histogram range configurations) have been done.

The root process (the one that starts all the other child threads and processes) must be the first one to make the call, with parent = true, with all other calling it with = false.

Return whether to ignore the variable with a given name as unneeded by the console.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines