Page Speed Optimization Libraries
1.9.32.1
|
#include "debug_filter.h"
Public Member Functions | |
DebugFilter (RewriteDriver *driver) | |
virtual void | EndDocument () |
virtual void | Flush () |
virtual const char * | Name () const |
void | InitParse () |
void | StartParse () |
void | EndParse () |
void | StartRender () |
void | EndRender () |
virtual void | EndElement (HtmlElement *element) |
GoogleString | ListActiveFiltersAndOptions () const |
Static Public Member Functions | |
static GoogleString | FormatFlushMessage (int64 time_since_init_parse_us, int64 parse_duration_us, int64 flush_duration_us, int64 idle_duration_us) |
static GoogleString | FormatEndDocumentMessage (int64 time_since_init_parse_us, int64 total_parse_duration_us, int64 total_flush_duration_us, int64 total_idle_duration_us, int num_flushes, bool is_critical_images_beacon_enabled, const StringSet &critical_image_urls, const StringVector &dynamically_disabled_filter_list) |
Injects HTML comments for measuring the time it takes to parse HTML, run the Flush/Render sequence, and the idle-time between text blocks. Data is written into the HTML as comments.
|
static |
Formats Flush/EndOfDocument messages that will be easy to read from View->PageSource in a browser.
They are exposed for testing, so that unit tests are not concerned with the exact formatting of those messages.
void net_instaweb::DebugFilter::InitParse | ( | ) |
Special entry-points needed for measuring timing. The timing of StartDocument/EndDocument does not capture the correct timing, and changing them so they do would alter functionality depended upon by numerous filters. So we have special entry-points for this filter called directly by RewriteDriver. This can be generalized in the future if these entry-points prove useful.
GoogleString net_instaweb::DebugFilter::ListActiveFiltersAndOptions | ( | ) | const |
Gets the list of active filters from the RewriteDriver for logging to debug message.