Index: chrome/renderer/page_load_histograms.cc |
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc |
index 77c988690b08e85e244e447b3c9cc61edfdac46c..843176f94a83afb4fd5a24809c1647212f9de357 100644 |
--- a/chrome/renderer/page_load_histograms.cc |
+++ b/chrome/renderer/page_load_histograms.cc |
@@ -235,30 +235,26 @@ void DumpHistograms(const WebPerformance& performance, |
bool is_preview, |
URLPattern::SchemeMasks scheme_type) { |
// This function records new histograms based on the Navigation Timing |
// records. As such, the histograms should not depend on the deprecated timing |
// information collected in DocumentState. However, here for some reason we |
// check if document_state->request_time() is null. TODO(ppi): find out why |
// and remove DocumentState from the parameter list. |
Time request = document_state->request_time(); |
Time navigation_start = Time::FromDoubleT(performance.navigationStart()); |
- Time redirect_start = Time::FromDoubleT(performance.redirectStart()); |
- Time redirect_end = Time::FromDoubleT(performance.redirectEnd()); |
- Time fetch_start = Time::FromDoubleT(performance.fetchStart()); |
Time domain_lookup_start = Time::FromDoubleT(performance.domainLookupStart()); |
Time domain_lookup_end = Time::FromDoubleT(performance.domainLookupEnd()); |
Time connect_start = Time::FromDoubleT(performance.connectStart()); |
Time connect_end = Time::FromDoubleT(performance.connectEnd()); |
Time request_start = Time::FromDoubleT(performance.requestStart()); |
Time response_start = Time::FromDoubleT(performance.responseStart()); |
- Time response_end = Time::FromDoubleT(performance.responseEnd()); |
Time dom_loading = Time::FromDoubleT(performance.domLoading()); |
Time dom_interactive = Time::FromDoubleT(performance.domInteractive()); |
Time dom_content_loaded_start = |
Time::FromDoubleT(performance.domContentLoadedEventStart()); |
Time dom_content_loaded_end = |
Time::FromDoubleT(performance.domContentLoadedEventEnd()); |
Time load_event_start = Time::FromDoubleT(performance.loadEventStart()); |
Time load_event_end = Time::FromDoubleT(performance.loadEventEnd()); |
Time begin = (request.is_null() ? navigation_start : request_start); |
Time first_paint = document_state->first_paint_time(); |
@@ -278,96 +274,48 @@ void DumpHistograms(const WebPerformance& performance, |
// TODO(dominich): Investigate conditions under which |load_event_start| and |
// |load_event_end| may be NULL as in the non-PT_ case below. Examples in |
// http://crbug.com/112006. |
// DCHECK(!load_event_start.is_null()); |
// DCHECK(!load_event_end.is_null()); |
if (document_state->web_timing_histograms_recorded()) |
return; |
document_state->set_web_timing_histograms_recorded(true); |
- if (!redirect_start.is_null() && !redirect_end.is_null()) { |
- PLT_HISTOGRAM_DRP("PLT.NT_Redirect", |
- redirect_end - redirect_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- PLT_HISTOGRAM_DRP( |
- "PLT.NT_DelayBeforeFetchRedirect", |
- (fetch_start - navigation_start) - (redirect_end - redirect_start), |
- data_reduction_proxy_was_used, |
- scheme_type); |
- } else { |
- PLT_HISTOGRAM_DRP("PLT.NT_DelayBeforeFetch", |
- fetch_start - navigation_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- } |
- PLT_HISTOGRAM_DRP("PLT.NT_DelayBeforeDomainLookup", |
- domain_lookup_start - fetch_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
PLT_HISTOGRAM_DRP("PLT.NT_DomainLookup", |
domain_lookup_end - domain_lookup_start, |
data_reduction_proxy_was_used, |
scheme_type); |
- PLT_HISTOGRAM_DRP("PLT.NT_DelayBeforeConnect", |
- connect_start - domain_lookup_end, |
- data_reduction_proxy_was_used, |
- scheme_type); |
PLT_HISTOGRAM_DRP("PLT.NT_Connect", |
connect_end - connect_start, |
data_reduction_proxy_was_used, |
scheme_type); |
- PLT_HISTOGRAM_DRP("PLT.NT_DelayBeforeRequest", |
- request_start - connect_end, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- PLT_HISTOGRAM_DRP("PLT.NT_Request", |
- response_start - request_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- PLT_HISTOGRAM_DRP("PLT.NT_Response", |
- response_end - response_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- if (!dom_loading.is_null()) { |
- PLT_HISTOGRAM_DRP("PLT.NT_DelayBeforeDomLoading", |
- dom_loading - response_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- } |
if (!dom_interactive.is_null() && !dom_loading.is_null()) { |
PLT_HISTOGRAM_DRP("PLT.NT_DomLoading", |
dom_interactive - dom_loading, |
data_reduction_proxy_was_used, |
scheme_type); |
} |
if (!dom_content_loaded_start.is_null() && !dom_interactive.is_null()) { |
PLT_HISTOGRAM_DRP("PLT.NT_DomInteractive", |
dom_content_loaded_start - dom_interactive, |
data_reduction_proxy_was_used, |
scheme_type); |
} |
if (!dom_content_loaded_start.is_null() && |
!dom_content_loaded_end.is_null() ) { |
PLT_HISTOGRAM_DRP("PLT.NT_DomContentLoaded", |
dom_content_loaded_end - dom_content_loaded_start, |
data_reduction_proxy_was_used, |
scheme_type); |
} |
- if (!dom_content_loaded_end.is_null() && !load_event_start.is_null()) { |
- PLT_HISTOGRAM_DRP("PLT.NT_DelayBeforeLoadEvent", |
- load_event_start - dom_content_loaded_end, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- } |
// TODO(simonjam): There is no way to distinguish between abandonment and |
// intentional Javascript navigation before the load event fires. |
// TODO(dominich): Load type breakdown |
if (!load_event_start.is_null()) { |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_BeginToFinishDoc", |
load_event_start - begin, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |