Index: chrome/renderer/page_load_histograms.cc |
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc |
index 443fc409c5f328017ca387dfef2a554ffceb2260..0583d15cd6b25af88d8af7869a623fbb98915e7a 100644 |
--- a/chrome/renderer/page_load_histograms.cc |
+++ b/chrome/renderer/page_load_histograms.cc |
@@ -213,6 +213,8 @@ int GetQueryStringBasedExperiment(const GURL& referrer) { |
void DumpHistograms(const WebPerformance& performance, |
DocumentState* document_state, |
bool data_reduction_proxy_was_used, |
+ bool lofi_enabled, |
+ bool lofi_control, |
bool came_from_websearch, |
int websearch_chrome_joint_experiment_id, |
bool is_preview, |
@@ -412,6 +414,26 @@ void DumpHistograms(const WebPerformance& performance, |
load_event_end - navigation_start); |
PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy", |
load_event_end - request_start); |
+ if (lofi_enabled) { |
+ PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_LoFiOn", |
+ load_event_end - begin); |
+ PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_LoFiOn", |
+ load_event_end - response_start); |
+ PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_LoFiOn", |
+ load_event_end - navigation_start); |
+ PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_LoFiOn", |
+ load_event_end - request_start); |
+ } |
+ if (lofi_control) { |
+ PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_LoFiOff", |
+ load_event_end - begin); |
+ PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_LoFiOff", |
+ load_event_end - response_start); |
+ PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_LoFiOff", |
+ load_event_end - navigation_start); |
+ PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_LoFiOff", |
+ load_event_end - request_start); |
+ } |
} else { |
PLT_HISTOGRAM("PLT.PT_BeginToFinish_HTTPS_DataReductionProxy", |
load_event_end - begin); |
@@ -421,6 +443,29 @@ void DumpHistograms(const WebPerformance& performance, |
load_event_end - navigation_start); |
PLT_HISTOGRAM("PLT.PT_StartToFinish_HTTPS_DataReductionProxy", |
load_event_end - request_start); |
+ if (lofi_enabled) { |
+ PLT_HISTOGRAM("PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_LoFiOn", |
+ load_event_end - begin); |
+ PLT_HISTOGRAM("PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_LoFiOn", |
+ load_event_end - response_start); |
+ PLT_HISTOGRAM( |
+ "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_LoFiOn", |
+ load_event_end - navigation_start); |
+ PLT_HISTOGRAM("PLT.PT_StartToFinish_HTTPS_DataReductionProxy_LoFiOn", |
+ load_event_end - request_start); |
+ } |
+ if (lofi_control) { |
+ PLT_HISTOGRAM("PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_LoFiOff", |
+ load_event_end - begin); |
+ PLT_HISTOGRAM( |
+ "PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_LoFiOff", |
+ load_event_end - response_start); |
+ PLT_HISTOGRAM( |
+ "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_LoFiOff", |
+ load_event_end - navigation_start); |
+ PLT_HISTOGRAM("PLT.PT_StartToFinish_HTTPS_DataReductionProxy_LoFiOff", |
+ load_event_end - request_start); |
+ } |
} |
} |
} |
@@ -452,10 +497,32 @@ void DumpHistograms(const WebPerformance& performance, |
if ((scheme_type & URLPattern::SCHEME_HTTPS) == 0) { |
PLT_HISTOGRAM("PLT.PT_RequestToDomContentLoaded_DataReductionProxy", |
dom_content_loaded_start - navigation_start); |
+ if (lofi_enabled) { |
+ PLT_HISTOGRAM( |
+ "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_LoFiOn", |
+ dom_content_loaded_start - navigation_start); |
+ } |
+ if (lofi_control) { |
+ PLT_HISTOGRAM( |
+ "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_LoFiOff", |
+ dom_content_loaded_start - navigation_start); |
+ } |
} else { |
PLT_HISTOGRAM( |
"PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy", |
dom_content_loaded_start - navigation_start); |
+ if (lofi_enabled) { |
+ PLT_HISTOGRAM( |
+ "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_" |
+ "LoFiOn", |
+ dom_content_loaded_start - navigation_start); |
+ } |
+ if (lofi_control) { |
+ PLT_HISTOGRAM( |
+ "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_" |
+ "LoFiOff", |
+ dom_content_loaded_start - navigation_start); |
+ } |
} |
} |
} |
@@ -752,10 +819,15 @@ void PageLoadHistograms::Dump(WebFrame* frame) { |
DocumentState::FromDataSource(frame->dataSource()); |
bool data_reduction_proxy_was_used = false; |
+ bool lofi_enabled = false; |
+ bool lofi_control = false; |
if (!document_state->proxy_server().IsEmpty()) { |
- Send(new DataReductionProxyViewHostMsg_IsDataReductionProxy( |
- document_state->proxy_server(), &data_reduction_proxy_was_used)); |
+ Send(new DataReductionProxyViewHostMsg_DataReductionProxyStatus( |
+ document_state->proxy_server(), &data_reduction_proxy_was_used, |
+ &lofi_enabled, &lofi_control)); |
} |
+ // At most one of |lofi_enabled| and |lofi_control| can be true. |
+ DCHECK(!(lofi_enabled && lofi_control)); |
jeremyim
2015/05/11 17:30:21
Shouldn't this just be an enum if it's a tri-state
tbansal1
2015/05/11 21:22:53
Done.
|
bool came_from_websearch = |
IsFromGoogleSearchResult(frame->document().url(), |
@@ -771,11 +843,9 @@ void PageLoadHistograms::Dump(WebFrame* frame) { |
// Metrics based on the timing information recorded for the Navigation Timing |
// API - http://www.w3.org/TR/navigation-timing/. |
DumpHistograms(frame->performance(), document_state, |
- data_reduction_proxy_was_used, |
- came_from_websearch, |
- websearch_chrome_joint_experiment_id, |
- is_preview, |
- scheme_type); |
+ data_reduction_proxy_was_used, lofi_enabled, lofi_control, |
+ came_from_websearch, websearch_chrome_joint_experiment_id, |
+ is_preview, scheme_type); |
// Old metrics based on the timing information stored in DocumentState. These |
// are deprecated and should go away. |