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

#include "waveform.h"

Public Member Functions

 Waveform (ThreadSystem *thread_system, Timer *timer, int capacity, UpDownCounter *metric)
 
void Clear ()
 
double Average ()
 
double Maximum ()
 
double Minimum ()
 
int Size ()
 
void Add (double value)
 Records a value at the current time using the Timer.
 
void AddDelta (double delta)
 
void Render (const StringPiece &title, const StringPiece &label, Writer *writer, MessageHandler *handler)
 Renders a waveform into HTML.
 

Static Public Member Functions

static void RenderHeader (Writer *writer, MessageHandler *handler)
 

Detailed Description

Displays a waveform of values over time. This can run continuously, in which case it will only display waveforms for a bounded number of samples. Or it can be run as a trigger.

However the average, min, and max values will account for all the values seen by the waveform since it was cleared.

This class is threadsafe.

Member Function Documentation

void net_instaweb::Waveform::AddDelta ( double  delta)

Records a delta relative to the previous value using the Timer. This is equivalent to calling Add(previous_value + delta).

static void net_instaweb::Waveform::RenderHeader ( Writer writer,
MessageHandler handler 
)
static

Write script and function to web page. Note that this function should be called only once for each HTML page, and should not be used for each waveform.


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