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

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

Issue 16115002: Delete long-expired GlobalSdch field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: address comment Created 7 years, 6 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/browser/chrome_browser_main.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 <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcher", 404 PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcher",
405 begin_to_finish_all_loads); 405 begin_to_finish_all_loads);
406 } 406 }
407 if (document_state->was_referred_by_prefetcher()) { 407 if (document_state->was_referred_by_prefetcher()) {
408 PLT_HISTOGRAM("PLT.BeginToFinishDoc_ContentPrefetcherReferrer", 408 PLT_HISTOGRAM("PLT.BeginToFinishDoc_ContentPrefetcherReferrer",
409 begin_to_finish_doc); 409 begin_to_finish_doc);
410 PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcherReferrer", 410 PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcherReferrer",
411 begin_to_finish_all_loads); 411 begin_to_finish_all_loads);
412 } 412 }
413 413
414 // Histograms to determine if SDCH has an impact.
415 // TODO(jar): Consider removing per-link load types and the enumeration.
416 static const bool use_sdch_histogram =
417 base::FieldTrialList::TrialExists("GlobalSdch");
418 if (use_sdch_histogram) {
419 UMA_HISTOGRAM_ENUMERATION(
420 base::FieldTrial::MakeName("PLT.LoadType", "GlobalSdch"),
421 load_type, DocumentState::kLoadTypeMax);
422 switch (load_type) {
423 case DocumentState::NORMAL_LOAD:
424 PLT_HISTOGRAM(base::FieldTrial::MakeName(
425 "PLT.BeginToFinish_NormalLoad", "GlobalSdch"),
426 begin_to_finish_all_loads);
427 break;
428 case DocumentState::LINK_LOAD_NORMAL:
429 PLT_HISTOGRAM(base::FieldTrial::MakeName(
430 "PLT.BeginToFinish_LinkLoadNormal", "GlobalSdch"),
431 begin_to_finish_all_loads);
432 break;
433 case DocumentState::LINK_LOAD_RELOAD:
434 PLT_HISTOGRAM(base::FieldTrial::MakeName(
435 "PLT.BeginToFinish_LinkLoadReload", "GlobalSdch"),
436 begin_to_finish_all_loads);
437 break;
438 case DocumentState::LINK_LOAD_CACHE_STALE_OK:
439 PLT_HISTOGRAM(base::FieldTrial::MakeName(
440 "PLT.BeginToFinish_LinkLoadStaleOk", "GlobalSdch"),
441 begin_to_finish_all_loads);
442 break;
443 case DocumentState::LINK_LOAD_CACHE_ONLY:
444 PLT_HISTOGRAM(base::FieldTrial::MakeName(
445 "PLT.BeginToFinish_LinkLoadCacheOnly", "GlobalSdch"),
446 begin_to_finish_all_loads);
447 break;
448 default:
449 break;
450 }
451 }
452
453 // TODO(mpcomplete): remove the extension-related histograms after we collect 414 // TODO(mpcomplete): remove the extension-related histograms after we collect
454 // enough data. http://crbug.com/100411 415 // enough data. http://crbug.com/100411
455 const bool use_adblock_histogram = 416 const bool use_adblock_histogram =
456 chrome::ChromeContentRendererClient::IsAdblockInstalled(); 417 chrome::ChromeContentRendererClient::IsAdblockInstalled();
457 if (use_adblock_histogram) { 418 if (use_adblock_histogram) {
458 UMA_HISTOGRAM_ENUMERATION( 419 UMA_HISTOGRAM_ENUMERATION(
459 "PLT.Abandoned_ExtensionAdblock", 420 "PLT.Abandoned_ExtensionAdblock",
460 abandoned_page ? 1 : 0, 2); 421 abandoned_page ? 1 : 0, 2);
461 switch (load_type) { 422 switch (load_type) {
462 case DocumentState::NORMAL_LOAD: 423 case DocumentState::NORMAL_LOAD:
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 710
750 DCHECK(document_state); 711 DCHECK(document_state);
751 DCHECK(ds); 712 DCHECK(ds);
752 GURL url(ds->request().url()); 713 GURL url(ds->request().url());
753 Time start = document_state->start_load_time(); 714 Time start = document_state->start_load_time();
754 Time finish = document_state->finish_load_time(); 715 Time finish = document_state->finish_load_time();
755 // TODO(mbelshe): should we log more stats? 716 // TODO(mbelshe): should we log more stats?
756 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " 717 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms "
757 << url.spec(); 718 << url.spec();
758 } 719 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698