Page Speed Optimization Libraries
1.7.30.1
|
#include "request_context.h"
Public Member Functions | |
TimingInfo (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 |
TimingInfo tracks various event timestamps over the lifetime of a request. The timeline looks (roughly) like the following, with the associated TimingInfo calls.
net_instaweb::RequestContext::TimingInfo::TimingInfo | ( | 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.
Fetch related timing events. Note: Only the first call to FetchStarted will have an effect, subsequent calls are silent no-ops.
bool net_instaweb::RequestContext::TimingInfo::GetProcessingElapsedMs | ( | int64 * | elapsed_ms | ) | const |
Milliseconds spent "processing": end time - start time - fetch time.
bool net_instaweb::RequestContext::TimingInfo::GetTimeToFirstByte | ( | int64 * | latency_ms | ) | const |
Milliseconds from receiving the request (Init) to responding with the first byte of data.
void net_instaweb::RequestContext::TimingInfo::ProcessingStarted | ( | ) | [inline] |
This should be called once the options are available and PSOL can start doing meaningful work.
void net_instaweb::RequestContext::TimingInfo::RequestFinished | ( | ) | [inline] |
Called when the request is finished, i.e. the response has been sent to the client.
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::RequestContext::TimingInfo::SetHTTPCacheLatencyMs | ( | int64 | latency_ms | ) |