Page Speed Optimization Libraries
1.5.27.2
|
Public Member Functions | |
SharedMemConsoleStatisticsLogger (int64 update_interval_ms, int64 max_logfile_size_kb, const StringPiece &log_file, SharedMemVariable *last_dump_timestamp, MessageHandler *message_handler, Statistics *stats, FileSystem *file_system, Timer *timer) | |
virtual void | DumpJSON (const std::set< GoogleString > &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. | |
Friends | |
class | SharedMemStatisticsTestBase |
virtual void net_instaweb::SharedMemConsoleStatisticsLogger::DumpJSON | ( | const std::set< GoogleString > & | var_titles, |
int64 | start_time, | ||
int64 | end_time, | ||
int64 | granularity_ms, | ||
Writer * | writer, | ||
MessageHandler * | message_handler | ||
) | const [virtual] |
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.
Implements net_instaweb::ConsoleStatisticsLogger.
If it's been longer than kStatisticsDumpIntervalMs, update the timestamp to now and dump the current state of the Statistics.