Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: chrome/renderer/page_load_histograms.cc

Issue 1140443002: Modify IPC call to properly record the PLT histograms for LoFi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed minor typo in test Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..52ed3ac53e7e1b002f667a85fdacd591deab79d0 100644
--- a/chrome/renderer/page_load_histograms.cc
+++ b/chrome/renderer/page_load_histograms.cc
@@ -213,6 +213,7 @@ int GetQueryStringBasedExperiment(const GURL& referrer) {
void DumpHistograms(const WebPerformance& performance,
DocumentState* document_state,
bool data_reduction_proxy_was_used,
+ data_reduction_proxy::AutoLoFiStatus auto_lofi_status,
bool came_from_websearch,
int websearch_chrome_joint_experiment_id,
bool is_preview,
@@ -412,6 +413,26 @@ void DumpHistograms(const WebPerformance& performance,
load_event_end - navigation_start);
PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy",
load_event_end - request_start);
+ if (auto_lofi_status == data_reduction_proxy::AUTO_LOFI_STATUS_ON) {
+ PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_AutoLoFiOn",
+ load_event_end - begin);
+ PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_AutoLoFiOn",
+ load_event_end - response_start);
+ PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_AutoLoFiOn",
+ load_event_end - navigation_start);
+ PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_AutoLoFiOn",
+ load_event_end - request_start);
+ } else if (auto_lofi_status ==
+ data_reduction_proxy::AUTO_LOFI_STATUS_OFF) {
+ PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_AutoLoFiOff",
+ load_event_end - begin);
+ PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_AutoLoFiOff",
+ load_event_end - response_start);
+ PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_AutoLoFiOff",
+ load_event_end - navigation_start);
+ PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_AutoLoFiOff",
+ load_event_end - request_start);
+ }
} else {
PLT_HISTOGRAM("PLT.PT_BeginToFinish_HTTPS_DataReductionProxy",
load_event_end - begin);
@@ -421,6 +442,34 @@ void DumpHistograms(const WebPerformance& performance,
load_event_end - navigation_start);
PLT_HISTOGRAM("PLT.PT_StartToFinish_HTTPS_DataReductionProxy",
load_event_end - request_start);
+ if (auto_lofi_status == data_reduction_proxy::AUTO_LOFI_STATUS_ON) {
+ PLT_HISTOGRAM(
+ "PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_AutoLoFiOn",
+ load_event_end - begin);
+ PLT_HISTOGRAM(
+ "PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_AutoLoFiOn",
+ load_event_end - response_start);
+ PLT_HISTOGRAM(
+ "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_AutoLoFiOn",
+ load_event_end - navigation_start);
+ PLT_HISTOGRAM(
+ "PLT.PT_StartToFinish_HTTPS_DataReductionProxy_AutoLoFiOn",
+ load_event_end - request_start);
+ } else if (auto_lofi_status ==
+ data_reduction_proxy::AUTO_LOFI_STATUS_OFF) {
+ PLT_HISTOGRAM(
+ "PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_AutoLoFiOff",
+ load_event_end - begin);
+ PLT_HISTOGRAM(
+ "PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_AutoLoFiOff",
+ load_event_end - response_start);
+ PLT_HISTOGRAM(
+ "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_AutoLoFiOff",
+ load_event_end - navigation_start);
+ PLT_HISTOGRAM(
+ "PLT.PT_StartToFinish_HTTPS_DataReductionProxy_AutoLoFiOff",
+ load_event_end - request_start);
+ }
}
}
}
@@ -452,10 +501,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 (auto_lofi_status == data_reduction_proxy::AUTO_LOFI_STATUS_ON) {
+ PLT_HISTOGRAM(
+ "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_AutoLoFiOn",
+ dom_content_loaded_start - navigation_start);
+ } else if (auto_lofi_status ==
+ data_reduction_proxy::AUTO_LOFI_STATUS_OFF) {
+ PLT_HISTOGRAM(
+ "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_AutoLoFiOff",
+ dom_content_loaded_start - navigation_start);
+ }
} else {
PLT_HISTOGRAM(
"PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy",
dom_content_loaded_start - navigation_start);
+ if (auto_lofi_status == data_reduction_proxy::AUTO_LOFI_STATUS_ON) {
+ PLT_HISTOGRAM(
+ "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_"
+ "AutoLoFiOn",
+ dom_content_loaded_start - navigation_start);
+ } else if (auto_lofi_status ==
+ data_reduction_proxy::AUTO_LOFI_STATUS_OFF) {
+ PLT_HISTOGRAM(
+ "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_"
+ "AutoLoFiOff",
+ dom_content_loaded_start - navigation_start);
+ }
}
}
}
@@ -752,9 +823,12 @@ void PageLoadHistograms::Dump(WebFrame* frame) {
DocumentState::FromDataSource(frame->dataSource());
bool data_reduction_proxy_was_used = false;
+ data_reduction_proxy::AutoLoFiStatus auto_lofi_status =
+ data_reduction_proxy::AUTO_LOFI_STATUS_DISABLED;
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,
+ &auto_lofi_status));
}
bool came_from_websearch =
@@ -771,11 +845,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, auto_lofi_status,
+ 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.
« no previous file with comments | « no previous file | components/data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698