Page Speed Optimization Libraries
1.13.35.1
|
#include "request_timing_info.h"
Public Member Functions | |
RequestTimingInfo (Timer *timer, AbstractMutex *mutex) | |
void | RequestStarted () |
void | ProcessingStarted () |
void | ParsingStarted () |
This should be called if/when HTML parsing begins. | |
void | FirstByteReturned () |
Called when the first byte is sent back to the user. | |
void | PropertyCacheLookupStarted () |
This should be called when a PropertyCache lookup is initiated. | |
void | PropertyCacheLookupFinished () |
This should be called when a PropertyCache lookup completes. | |
void | RequestFinished () |
void | FetchStarted () |
void | FetchHeaderReceived () |
void | FetchFinished () |
void | SetHTTPCacheLatencyMs (int64 latency_ms) |
void | SetL2HTTPCacheLatencyMs (int64 latency_ms) |
int64 | GetElapsedMs () const |
Milliseconds since Init. | |
bool | GetTimeToStartProcessingMs (int64 *elapsed_ms) const |
Milliseconds from request start to processing start. | |
bool | GetProcessingElapsedMs (int64 *elapsed_ms) const |
bool | GetTimeToPropertyCacheLookupStartMs (int64 *elapsed_ms) const |
Milliseconds from request start to pcache lookup start. | |
bool | GetTimeToPropertyCacheLookupEndMs (int64 *elapsed_ms) const |
Milliseconds from request start to pcache lookup end. | |
bool | GetHTTPCacheLatencyMs (int64 *latency_ms) const |
HTTP Cache latencies. | |
bool | GetL2HTTPCacheLatencyMs (int64 *latency_ms) const |
bool | GetTimeToStartFetchMs (int64 *elapsed_ms) const |
Milliseconds from request start to fetch start. | |
bool | GetFetchHeaderLatencyMs (int64 *latency_ms) const |
Milliseconds from fetch start to header received. | |
bool | GetFetchLatencyMs (int64 *latency_ms) const |
Milliseconds from fetch start to fetch end. | |
bool | GetTimeToFirstByte (int64 *latency_ms) const |
bool | GetTimeToStartParseMs (int64 *elapsed_ms) const |
Milliseconds from request start to parse start. | |
int64 | init_ts_ms () const |
int64 | start_ts_ms () const |
RequestTimingInfo tracks various event timestamps over the lifetime of a request. The timeline looks (roughly) like the following, with the associated RequestTimingInfo calls.
net_instaweb::RequestTimingInfo::RequestTimingInfo | ( | Timer * | timer, |
AbstractMutex * | mutex | ||
) |
Initialize the TimingInfo with the specified Timer. Sets init_ts_ to Timer::NowMs, from which GetElapsedMs is based. NOTE: Timer and mutex are not owned by TimingInfo.
void net_instaweb::RequestTimingInfo::FetchStarted | ( | ) |
Fetch related timing events. Note: Only the first call to FetchStarted will have an effect, subsequent calls are silent no-ops.
bool net_instaweb::RequestTimingInfo::GetProcessingElapsedMs | ( | int64 * | elapsed_ms | ) | const |
Milliseconds spent "processing": end time - start time - fetch time.
bool net_instaweb::RequestTimingInfo::GetTimeToFirstByte | ( | int64 * | latency_ms | ) | const |
Milliseconds from receiving the request (Init) to responding with the first byte of data.
|
inline |
This should be called once the options are available and PSOL can start doing meaningful work.
|
inline |
Called when the request is finished, i.e. the response has been sent to the client.
void net_instaweb::RequestTimingInfo::RequestStarted | ( | ) |
This should be called when the request "starts", potentially after queuing. It denotes the request "start time", which "elapsed" timing values are relative to.
void net_instaweb::RequestTimingInfo::SetHTTPCacheLatencyMs | ( | int64 | latency_ms | ) |