Page Speed Optimization Libraries
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
net_instaweb::StatisticsLogger Class Reference

Public Member Functions

 StatisticsLogger (int64 update_interval_ms, int64 max_logfile_size_kb, const StringPiece &log_file, MutexedScalar *last_dump_timestamp, MessageHandler *message_handler, Statistics *stats, FileSystem *file_system, Timer *timer)
 Does not take ownership of any objects passed in.
void DumpJSON (bool dump_for_graphs, const StringSet &var_titles, int64 start_time, int64 end_time, int64 granularity_ms, Writer *writer, MessageHandler *message_handler) const
void UpdateAndDumpIfRequired ()
void TrimLogfileIfNeeded ()
 Trim file down if it gets above max_logfile_size_kb.
void Init ()


class StatisticsLoggerTest

Member Function Documentation

void net_instaweb::StatisticsLogger::DumpJSON ( bool  dump_for_graphs,
const StringSet &  var_titles,
int64  start_time,
int64  end_time,
int64  granularity_ms,
Writer writer,
MessageHandler message_handler 
) const

Writes filtered variable data in JSON format to the given writer. Variable data is a time series collected from with data points from start_time to end_time. Granularity is the minimum time difference between each successive data point.

void net_instaweb::StatisticsLogger::Init ( )

Preload all the variables required for statistics logging. This must be called after statistics have been established, and before any logging is done.

It is OK to call this multiple times (e.g. before & after a fork).

void net_instaweb::StatisticsLogger::UpdateAndDumpIfRequired ( )

If it's been longer than kStatisticsDumpIntervalMs, update the timestamp to now and dump the current state of the Statistics.

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