Page Speed Optimization Libraries
1.3.25.1
|
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) |
ConsoleStatisticsLogger * | console_logger () const |
virtual void | DumpConsoleVarsToWriter (int64 current_time_ms, Writer *writer, MessageHandler *message_handler) |
bool | IsIgnoredVariable (const GoogleString &var_name) |
Protected Member Functions | |
virtual SharedMemVariable * | NewVariable (const StringPiece &name, int index) |
Interface to subclass. | |
virtual SharedMemHistogram * | NewHistogram (const StringPiece &name) |
virtual FakeTimedVariable * | NewTimedVariable (const StringPiece &name, int index) |
ConsoleStatisticsLogger* net_instaweb::SharedMemStatistics::console_logger | ( | ) | const [inline, virtual] |
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.
void net_instaweb::SharedMemStatistics::GlobalCleanup | ( | MessageHandler * | message_handler | ) |
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.
bool net_instaweb::SharedMemStatistics::IsIgnoredVariable | ( | const GoogleString & | var_name | ) |
Return whether to ignore the variable with a given name as unneeded by the console.