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

Side by Side Diff: chrome/renderer/page_load_histograms.cc

Issue 12316144: Merge 183832 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/pref_names.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/page_load_histograms.h" 5 #include "chrome/renderer/page_load_histograms.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 case DocumentState::LINK_LOAD_CACHE_ONLY: 314 case DocumentState::LINK_LOAD_CACHE_ONLY:
315 PLT_HISTOGRAM("PLT.BeginToFinishDoc_LinkLoadCacheOnly", 315 PLT_HISTOGRAM("PLT.BeginToFinishDoc_LinkLoadCacheOnly",
316 begin_to_finish_doc); 316 begin_to_finish_doc);
317 PLT_HISTOGRAM("PLT.BeginToFinish_LinkLoadCacheOnly", 317 PLT_HISTOGRAM("PLT.BeginToFinish_LinkLoadCacheOnly",
318 begin_to_finish_all_loads); 318 begin_to_finish_all_loads);
319 break; 319 break;
320 default: 320 default:
321 break; 321 break;
322 } 322 }
323 323
324 bool spdy_proxy_auth_origin_is_set = false;
325 #if defined(SPDY_PROXY_AUTH_ORIGIN)
326 spdy_proxy_auth_origin_is_set = true;
327 #else
328 spdy_proxy_auth_origin_is_set = CommandLine::ForCurrentProcess()->
329 HasSwitch(switches::kSpdyProxyAuthOrigin);
330 #endif
331
324 if (document_state->was_fetched_via_proxy() && 332 if (document_state->was_fetched_via_proxy() &&
325 document_state->was_fetched_via_spdy() && 333 document_state->was_fetched_via_spdy() && spdy_proxy_auth_origin_is_set) {
326 CommandLine::ForCurrentProcess()->HasSwitch(switches::kSpdyProxyOrigin)) {
327 UMA_HISTOGRAM_ENUMERATION( 334 UMA_HISTOGRAM_ENUMERATION(
328 "PLT.Abandoned_SpdyProxy", abandoned_page ? 1 : 0, 2); 335 "PLT.Abandoned_SpdyProxy", abandoned_page ? 1 : 0, 2);
329 PLT_HISTOGRAM("PLT.BeginToFinishDoc_SpdyProxy", begin_to_finish_doc); 336 PLT_HISTOGRAM("PLT.BeginToFinishDoc_SpdyProxy", begin_to_finish_doc);
330 PLT_HISTOGRAM("PLT.BeginToFinish_SpdyProxy", begin_to_finish_all_loads); 337 PLT_HISTOGRAM("PLT.BeginToFinish_SpdyProxy", begin_to_finish_all_loads);
331 } 338 }
332 339
333 // Histograms to determine if prefetch & prerender has an impact on PLT. 340 // Histograms to determine if prefetch & prerender has an impact on PLT.
334 static const bool prefetching_fieldtrial = 341 static const bool prefetching_fieldtrial =
335 base::FieldTrialList::TrialExists("Prefetch"); 342 base::FieldTrialList::TrialExists("Prefetch");
336 if (prefetching_fieldtrial) { 343 if (prefetching_fieldtrial) {
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 871
865 DCHECK(document_state); 872 DCHECK(document_state);
866 DCHECK(ds); 873 DCHECK(ds);
867 GURL url(ds->request().url()); 874 GURL url(ds->request().url());
868 Time start = document_state->start_load_time(); 875 Time start = document_state->start_load_time();
869 Time finish = document_state->finish_load_time(); 876 Time finish = document_state->finish_load_time();
870 // TODO(mbelshe): should we log more stats? 877 // TODO(mbelshe): should we log more stats?
871 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " 878 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms "
872 << url.spec(); 879 << url.spec();
873 } 880 }
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698