19 #ifndef PAGESPEED_OPT_LOGGING_REQUEST_TIMING_INFO_H_
20 #define PAGESPEED_OPT_LOGGING_REQUEST_TIMING_INFO_H_
24 namespace net_instaweb {
67 SetToNow(&pcache_lookup_start_ts_ms_);
83 void FetchHeaderReceived();
89 void SetL2HTTPCacheLatencyMs(int64 latency_ms);
96 return GetTimeFromStart(processing_start_ts_ms_, elapsed_ms);
107 return GetTimeFromStart(pcache_lookup_start_ts_ms_, elapsed_ms);
112 return GetTimeFromStart(pcache_lookup_end_ts_ms_, elapsed_ms);
117 bool GetL2HTTPCacheLatencyMs(int64* latency_ms)
const;
134 return GetTimeFromStart(parsing_start_ts_ms_, elapsed_ms);
137 int64 init_ts_ms()
const {
return init_ts_ms_; }
139 int64 start_ts_ms()
const {
return start_ts_ms_; }
145 void SetToNow(int64* ts_ms)
const;
149 bool GetTimeFromStart(int64 ts_ms, int64* elapsed_ms)
const;
160 int64 processing_start_ts_ms_;
161 int64 pcache_lookup_start_ts_ms_;
162 int64 pcache_lookup_end_ts_ms_;
163 int64 parsing_start_ts_ms_;
167 int64 fetch_start_ts_ms_;
169 int64 fetch_header_ts_ms_;
170 int64 fetch_end_ts_ms_;
171 int64 first_byte_ts_ms_;
174 int64 http_cache_latency_ms_;
175 int64 l2http_cache_latency_ms_;
void FirstByteReturned()
Called when the first byte is sent back to the user.
bool GetHTTPCacheLatencyMs(int64 *latency_ms) const
HTTP Cache latencies.
void ProcessingStarted()
Definition: request_timing_info.h:57
bool GetTimeToPropertyCacheLookupEndMs(int64 *elapsed_ms) const
Milliseconds from request start to pcache lookup end.
Definition: request_timing_info.h:111
void PropertyCacheLookupFinished()
This should be called when a PropertyCache lookup completes.
Definition: request_timing_info.h:71
Abstract interface for implementing a mutex.
Definition: abstract_mutex.h:28
bool GetProcessingElapsedMs(int64 *elapsed_ms) const
int64 GetElapsedMs() const
Milliseconds since Init.
bool GetFetchHeaderLatencyMs(int64 *latency_ms) const
Milliseconds from fetch start to header received.
void SetHTTPCacheLatencyMs(int64 latency_ms)
void RequestFinished()
Definition: request_timing_info.h:75
Definition: request_timing_info.h:43
void ParsingStarted()
This should be called if/when HTML parsing begins.
Definition: request_timing_info.h:60
bool GetTimeToStartProcessingMs(int64 *elapsed_ms) const
Milliseconds from request start to processing start.
Definition: request_timing_info.h:95
void PropertyCacheLookupStarted()
This should be called when a PropertyCache lookup is initiated.
Definition: request_timing_info.h:66
bool GetTimeToPropertyCacheLookupStartMs(int64 *elapsed_ms) const
Milliseconds from request start to pcache lookup start.
Definition: request_timing_info.h:106
bool GetFetchLatencyMs(int64 *latency_ms) const
Milliseconds from fetch start to fetch end.
bool GetTimeToStartParseMs(int64 *elapsed_ms) const
Milliseconds from request start to parse start.
Definition: request_timing_info.h:133
bool GetTimeToStartFetchMs(int64 *elapsed_ms) const
Milliseconds from request start to fetch start.
RequestTimingInfo(Timer *timer, AbstractMutex *mutex)
bool GetTimeToFirstByte(int64 *latency_ms) const
Timer interface, made virtual so it can be mocked for tests.
Definition: timer.h:27