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

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

Issue 6883102: Add one-time randomization support for FieldTrial, and the ability to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responding to review comments. Fix initialization in browser_main. Created 9 years, 8 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 22 matching lines...) Expand all
33 #define PLT_HISTOGRAM(name, sample) \ 33 #define PLT_HISTOGRAM(name, sample) \
34 UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, kPLTMin, kPLTMax, kPLTCount); 34 UMA_HISTOGRAM_CUSTOM_TIMES(name, sample, kPLTMin, kPLTMax, kPLTCount);
35 35
36 namespace { 36 namespace {
37 37
38 // Histograms to determine prerendering's impact on perceived PLT. 38 // Histograms to determine prerendering's impact on perceived PLT.
39 void UpdatePrerenderHistograms(NavigationState* navigation_state, 39 void UpdatePrerenderHistograms(NavigationState* navigation_state,
40 const Time& finish_all_loads, 40 const Time& finish_all_loads,
41 const TimeDelta& begin_to_finish_all_loads) { 41 const TimeDelta& begin_to_finish_all_loads) {
42 // Load time for non-prerendered pages. 42 // Load time for non-prerendered pages.
43 static bool use_prerender_histogram = 43 static const bool use_prerender_histogram =
44 base::FieldTrialList::Find("Prefetch") && 44 base::FieldTrialList::TrialExists("Prefetch");
45 !base::FieldTrialList::Find("Prefetch")->group_name().empty();
46 if (!navigation_state->was_started_as_prerender()) { 45 if (!navigation_state->was_started_as_prerender()) {
47 if (use_prerender_histogram) { 46 if (use_prerender_histogram) {
48 PLT_HISTOGRAM(base::FieldTrial::MakeName( 47 PLT_HISTOGRAM(base::FieldTrial::MakeName(
49 "PLT.PerceivedLoadTime", "Prefetch"), 48 "PLT.PerceivedLoadTime", "Prefetch"),
50 begin_to_finish_all_loads); 49 begin_to_finish_all_loads);
51 } 50 }
52 return; 51 return;
53 } 52 }
54 53
55 // Do not record stats for redirected prerendered pages. 54 // Do not record stats for redirected prerendered pages.
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 begin_to_finish_all_loads); 323 begin_to_finish_all_loads);
325 break; 324 break;
326 default: 325 default:
327 break; 326 break;
328 } 327 }
329 328
330 UpdatePrerenderHistograms(navigation_state, finish_all_loads, 329 UpdatePrerenderHistograms(navigation_state, finish_all_loads,
331 begin_to_finish_all_loads); 330 begin_to_finish_all_loads);
332 331
333 // Histograms to determine if DNS prefetching has an impact on PLT. 332 // Histograms to determine if DNS prefetching has an impact on PLT.
334 static bool use_dns_histogram(base::FieldTrialList::Find("DnsImpact") && 333 static const bool use_dns_histogram =
335 !base::FieldTrialList::Find("DnsImpact")->group_name().empty()); 334 base::FieldTrialList::TrialExists("DnsImpact");
336 if (use_dns_histogram) { 335 if (use_dns_histogram) {
337 UMA_HISTOGRAM_ENUMERATION( 336 UMA_HISTOGRAM_ENUMERATION(
338 base::FieldTrial::MakeName("PLT.Abandoned", "DnsImpact"), 337 base::FieldTrial::MakeName("PLT.Abandoned", "DnsImpact"),
339 abandoned_page ? 1 : 0, 2); 338 abandoned_page ? 1 : 0, 2);
340 UMA_HISTOGRAM_ENUMERATION( 339 UMA_HISTOGRAM_ENUMERATION(
341 base::FieldTrial::MakeName("PLT.LoadType", "DnsImpact"), 340 base::FieldTrial::MakeName("PLT.LoadType", "DnsImpact"),
342 load_type, NavigationState::kLoadTypeMax); 341 load_type, NavigationState::kLoadTypeMax);
343 switch (load_type) { 342 switch (load_type) {
344 case NavigationState::NORMAL_LOAD: 343 case NavigationState::NORMAL_LOAD:
345 PLT_HISTOGRAM(base::FieldTrial::MakeName( 344 PLT_HISTOGRAM(base::FieldTrial::MakeName(
(...skipping 15 matching lines...) Expand all
361 "PLT.BeginToFinish_LinkLoadStaleOk", "DnsImpact"), 360 "PLT.BeginToFinish_LinkLoadStaleOk", "DnsImpact"),
362 begin_to_finish_all_loads); 361 begin_to_finish_all_loads);
363 break; 362 break;
364 default: 363 default:
365 break; 364 break;
366 } 365 }
367 } 366 }
368 367
369 // Histograms to determine if content prefetching has an impact on PLT. 368 // Histograms to determine if content prefetching has an impact on PLT.
370 static const bool prefetching_fieldtrial = 369 static const bool prefetching_fieldtrial =
371 base::FieldTrialList::Find("Prefetch") && 370 base::FieldTrialList::TrialExists("Prefetch");
372 !base::FieldTrialList::Find("Prefetch")->group_name().empty();
373 if (prefetching_fieldtrial) { 371 if (prefetching_fieldtrial) {
374 if (navigation_state->was_prefetcher()) { 372 if (navigation_state->was_prefetcher()) {
375 PLT_HISTOGRAM(base::FieldTrial::MakeName( 373 PLT_HISTOGRAM(base::FieldTrial::MakeName(
376 "PLT.BeginToFinishDoc_ContentPrefetcher", "Prefetch"), 374 "PLT.BeginToFinishDoc_ContentPrefetcher", "Prefetch"),
377 begin_to_finish_doc); 375 begin_to_finish_doc);
378 PLT_HISTOGRAM(base::FieldTrial::MakeName( 376 PLT_HISTOGRAM(base::FieldTrial::MakeName(
379 "PLT.BeginToFinish_ContentPrefetcher", "Prefetch"), 377 "PLT.BeginToFinish_ContentPrefetcher", "Prefetch"),
380 begin_to_finish_all_loads); 378 begin_to_finish_all_loads);
381 } 379 }
382 if (navigation_state->was_referred_by_prefetcher()) { 380 if (navigation_state->was_referred_by_prefetcher()) {
383 PLT_HISTOGRAM(base::FieldTrial::MakeName( 381 PLT_HISTOGRAM(base::FieldTrial::MakeName(
384 "PLT.BeginToFinishDoc_ContentPrefetcherReferrer", "Prefetch"), 382 "PLT.BeginToFinishDoc_ContentPrefetcherReferrer", "Prefetch"),
385 begin_to_finish_doc); 383 begin_to_finish_doc);
386 PLT_HISTOGRAM(base::FieldTrial::MakeName( 384 PLT_HISTOGRAM(base::FieldTrial::MakeName(
387 "PLT.BeginToFinish_ContentPrefetcherReferrer", "Prefetch"), 385 "PLT.BeginToFinish_ContentPrefetcherReferrer", "Prefetch"),
388 begin_to_finish_all_loads); 386 begin_to_finish_all_loads);
389 } 387 }
390 UMA_HISTOGRAM_ENUMERATION(base::FieldTrial::MakeName( 388 UMA_HISTOGRAM_ENUMERATION(base::FieldTrial::MakeName(
391 "PLT.Abandoned", "Prefetch"), 389 "PLT.Abandoned", "Prefetch"),
392 abandoned_page ? 1 : 0, 2); 390 abandoned_page ? 1 : 0, 2);
393 PLT_HISTOGRAM(base::FieldTrial::MakeName( 391 PLT_HISTOGRAM(base::FieldTrial::MakeName(
394 "PLT.BeginToFinishDoc", "Prefetch"), 392 "PLT.BeginToFinishDoc", "Prefetch"),
395 begin_to_finish_doc); 393 begin_to_finish_doc);
396 PLT_HISTOGRAM(base::FieldTrial::MakeName( 394 PLT_HISTOGRAM(base::FieldTrial::MakeName(
397 "PLT.BeginToFinish", "Prefetch"), 395 "PLT.BeginToFinish", "Prefetch"),
398 begin_to_finish_all_loads); 396 begin_to_finish_all_loads);
399 } 397 }
400 398
401 // Histograms to determine if backup connection jobs have an impact on PLT. 399 // Histograms to determine if backup connection jobs have an impact on PLT.
402 static const bool connect_backup_jobs_fieldtrial( 400 static const bool connect_backup_jobs_fieldtrial =
403 base::FieldTrialList::Find("ConnnectBackupJobs") && 401 base::FieldTrialList::TrialExists("ConnnectBackupJobs");
404 !base::FieldTrialList::Find("ConnnectBackupJobs")->group_name().empty());
405 if (connect_backup_jobs_fieldtrial) { 402 if (connect_backup_jobs_fieldtrial) {
406 UMA_HISTOGRAM_ENUMERATION( 403 UMA_HISTOGRAM_ENUMERATION(
407 base::FieldTrial::MakeName("PLT.Abandoned", "ConnnectBackupJobs"), 404 base::FieldTrial::MakeName("PLT.Abandoned", "ConnnectBackupJobs"),
408 abandoned_page ? 1 : 0, 2); 405 abandoned_page ? 1 : 0, 2);
409 UMA_HISTOGRAM_ENUMERATION( 406 UMA_HISTOGRAM_ENUMERATION(
410 base::FieldTrial::MakeName("PLT.LoadType", "ConnnectBackupJobs"), 407 base::FieldTrial::MakeName("PLT.LoadType", "ConnnectBackupJobs"),
411 load_type, NavigationState::kLoadTypeMax); 408 load_type, NavigationState::kLoadTypeMax);
412 switch (load_type) { 409 switch (load_type) {
413 case NavigationState::NORMAL_LOAD: 410 case NavigationState::NORMAL_LOAD:
414 PLT_HISTOGRAM(base::FieldTrial::MakeName( 411 PLT_HISTOGRAM(base::FieldTrial::MakeName(
(...skipping 17 matching lines...) Expand all
432 break; 429 break;
433 default: 430 default:
434 break; 431 break;
435 } 432 }
436 } 433 }
437 434
438 // Histograms to determine if the number of connections has an 435 // Histograms to determine if the number of connections has an
439 // impact on PLT. 436 // impact on PLT.
440 // TODO(jar): Consider removing the per-link-type versions. We 437 // TODO(jar): Consider removing the per-link-type versions. We
441 // really only need LINK_LOAD_NORMAL and NORMAL_LOAD. 438 // really only need LINK_LOAD_NORMAL and NORMAL_LOAD.
442 static bool use_connection_impact_histogram( 439 static const bool use_connection_impact_histogram =
443 base::FieldTrialList::Find("ConnCountImpact") && 440 base::FieldTrialList::TrialExists("ConnCountImpact");
444 !base::FieldTrialList::Find("ConnCountImpact")->group_name().empty());
445 if (use_connection_impact_histogram) { 441 if (use_connection_impact_histogram) {
446 UMA_HISTOGRAM_ENUMERATION( 442 UMA_HISTOGRAM_ENUMERATION(
447 base::FieldTrial::MakeName("PLT.Abandoned", "ConnCountImpact"), 443 base::FieldTrial::MakeName("PLT.Abandoned", "ConnCountImpact"),
448 abandoned_page ? 1 : 0, 2); 444 abandoned_page ? 1 : 0, 2);
449 switch (load_type) { 445 switch (load_type) {
450 case NavigationState::NORMAL_LOAD: 446 case NavigationState::NORMAL_LOAD:
451 PLT_HISTOGRAM(base::FieldTrial::MakeName( 447 PLT_HISTOGRAM(base::FieldTrial::MakeName(
452 "PLT.BeginToFinish_NormalLoad", "ConnCountImpact"), 448 "PLT.BeginToFinish_NormalLoad", "ConnCountImpact"),
453 begin_to_finish_all_loads); 449 begin_to_finish_all_loads);
454 break; 450 break;
(...skipping 11 matching lines...) Expand all
466 PLT_HISTOGRAM(base::FieldTrial::MakeName( 462 PLT_HISTOGRAM(base::FieldTrial::MakeName(
467 "PLT.BeginToFinish_LinkLoadStaleOk", "ConnCountImpact"), 463 "PLT.BeginToFinish_LinkLoadStaleOk", "ConnCountImpact"),
468 begin_to_finish_all_loads); 464 begin_to_finish_all_loads);
469 break; 465 break;
470 default: 466 default:
471 break; 467 break;
472 } 468 }
473 } 469 }
474 470
475 // Histograms to determine effect of idle socket timeout. 471 // Histograms to determine effect of idle socket timeout.
476 static bool use_idle_socket_timeout_histogram( 472 static const bool use_idle_socket_timeout_histogram =
477 base::FieldTrialList::Find("IdleSktToImpact") && 473 base::FieldTrialList::TrialExists("IdleSktToImpact");
478 !base::FieldTrialList::Find("IdleSktToImpact")->group_name().empty());
479 if (use_idle_socket_timeout_histogram) { 474 if (use_idle_socket_timeout_histogram) {
480 UMA_HISTOGRAM_ENUMERATION( 475 UMA_HISTOGRAM_ENUMERATION(
481 base::FieldTrial::MakeName("PLT.Abandoned", "IdleSktToImpact"), 476 base::FieldTrial::MakeName("PLT.Abandoned", "IdleSktToImpact"),
482 abandoned_page ? 1 : 0, 2); 477 abandoned_page ? 1 : 0, 2);
483 switch (load_type) { 478 switch (load_type) {
484 case NavigationState::NORMAL_LOAD: 479 case NavigationState::NORMAL_LOAD:
485 PLT_HISTOGRAM(base::FieldTrial::MakeName( 480 PLT_HISTOGRAM(base::FieldTrial::MakeName(
486 "PLT.BeginToFinish_NormalLoad", "IdleSktToImpact"), 481 "PLT.BeginToFinish_NormalLoad", "IdleSktToImpact"),
487 begin_to_finish_all_loads); 482 begin_to_finish_all_loads);
488 break; 483 break;
(...skipping 11 matching lines...) Expand all
500 PLT_HISTOGRAM(base::FieldTrial::MakeName( 495 PLT_HISTOGRAM(base::FieldTrial::MakeName(
501 "PLT.BeginToFinish_LinkLoadStaleOk", "IdleSktToImpact"), 496 "PLT.BeginToFinish_LinkLoadStaleOk", "IdleSktToImpact"),
502 begin_to_finish_all_loads); 497 begin_to_finish_all_loads);
503 break; 498 break;
504 default: 499 default:
505 break; 500 break;
506 } 501 }
507 } 502 }
508 503
509 // Histograms to determine effect of number of connections per proxy. 504 // Histograms to determine effect of number of connections per proxy.
510 static bool use_proxy_connection_impact_histogram( 505 static const bool use_proxy_connection_impact_histogram =
511 base::FieldTrialList::Find("ProxyConnectionImpact") && 506 base::FieldTrialList::TrialExists("ProxyConnectionImpact");
512 !base::FieldTrialList::Find(
513 "ProxyConnectionImpact")->group_name().empty());
514 if (use_proxy_connection_impact_histogram) { 507 if (use_proxy_connection_impact_histogram) {
515 UMA_HISTOGRAM_ENUMERATION( 508 UMA_HISTOGRAM_ENUMERATION(
516 base::FieldTrial::MakeName("PLT.Abandoned", "ProxyConnectionImpact"), 509 base::FieldTrial::MakeName("PLT.Abandoned", "ProxyConnectionImpact"),
517 abandoned_page ? 1 : 0, 2); 510 abandoned_page ? 1 : 0, 2);
518 switch (load_type) { 511 switch (load_type) {
519 case NavigationState::NORMAL_LOAD: 512 case NavigationState::NORMAL_LOAD:
520 PLT_HISTOGRAM(base::FieldTrial::MakeName( 513 PLT_HISTOGRAM(base::FieldTrial::MakeName(
521 "PLT.BeginToFinish_NormalLoad", "ProxyConnectionImpact"), 514 "PLT.BeginToFinish_NormalLoad", "ProxyConnectionImpact"),
522 begin_to_finish_all_loads); 515 begin_to_finish_all_loads);
523 break; 516 break;
(...skipping 12 matching lines...) Expand all
536 "PLT.BeginToFinish_LinkLoadStaleOk", "ProxyConnectionImpact"), 529 "PLT.BeginToFinish_LinkLoadStaleOk", "ProxyConnectionImpact"),
537 begin_to_finish_all_loads); 530 begin_to_finish_all_loads);
538 break; 531 break;
539 default: 532 default:
540 break; 533 break;
541 } 534 }
542 } 535 }
543 536
544 // Histograms to determine if SDCH has an impact. 537 // Histograms to determine if SDCH has an impact.
545 // TODO(jar): Consider removing per-link load types and the enumeration. 538 // TODO(jar): Consider removing per-link load types and the enumeration.
546 static bool use_sdch_histogram(base::FieldTrialList::Find("GlobalSdch") && 539 static const bool use_sdch_histogram =
547 !base::FieldTrialList::Find("GlobalSdch")->group_name().empty()); 540 base::FieldTrialList::TrialExists("GlobalSdch");
548 if (use_sdch_histogram) { 541 if (use_sdch_histogram) {
549 UMA_HISTOGRAM_ENUMERATION( 542 UMA_HISTOGRAM_ENUMERATION(
550 base::FieldTrial::MakeName("PLT.LoadType", "GlobalSdch"), 543 base::FieldTrial::MakeName("PLT.LoadType", "GlobalSdch"),
551 load_type, NavigationState::kLoadTypeMax); 544 load_type, NavigationState::kLoadTypeMax);
552 switch (load_type) { 545 switch (load_type) {
553 case NavigationState::NORMAL_LOAD: 546 case NavigationState::NORMAL_LOAD:
554 PLT_HISTOGRAM(base::FieldTrial::MakeName( 547 PLT_HISTOGRAM(base::FieldTrial::MakeName(
555 "PLT.BeginToFinish_NormalLoad", "GlobalSdch"), 548 "PLT.BeginToFinish_NormalLoad", "GlobalSdch"),
556 begin_to_finish_all_loads); 549 begin_to_finish_all_loads);
557 break; 550 break;
(...skipping 16 matching lines...) Expand all
574 PLT_HISTOGRAM(base::FieldTrial::MakeName( 567 PLT_HISTOGRAM(base::FieldTrial::MakeName(
575 "PLT.BeginToFinish_LinkLoadCacheOnly", "GlobalSdch"), 568 "PLT.BeginToFinish_LinkLoadCacheOnly", "GlobalSdch"),
576 begin_to_finish_all_loads); 569 begin_to_finish_all_loads);
577 break; 570 break;
578 default: 571 default:
579 break; 572 break;
580 } 573 }
581 } 574 }
582 575
583 // Histograms to determine if cache size has an impact on PLT. 576 // Histograms to determine if cache size has an impact on PLT.
584 static bool use_cache_histogram1(base::FieldTrialList::Find("CacheSize") && 577 static const bool use_cache_histogram1 =
585 !base::FieldTrialList::Find("CacheSize")->group_name().empty()); 578 base::FieldTrialList::TrialExists("CacheSize");
586 if (use_cache_histogram1 && NavigationState::LINK_LOAD_NORMAL <= load_type && 579 if (use_cache_histogram1 && NavigationState::LINK_LOAD_NORMAL <= load_type &&
587 NavigationState::LINK_LOAD_CACHE_ONLY >= load_type) { 580 NavigationState::LINK_LOAD_CACHE_ONLY >= load_type) {
588 // TODO(mbelshe): Do we really want BeginToFinishDoc here? It seems like 581 // TODO(mbelshe): Do we really want BeginToFinishDoc here? It seems like
589 // StartToFinish or BeginToFinish would be better. 582 // StartToFinish or BeginToFinish would be better.
590 PLT_HISTOGRAM(base::FieldTrial::MakeName( 583 PLT_HISTOGRAM(base::FieldTrial::MakeName(
591 "PLT.BeginToFinishDoc_LinkLoad", "CacheSize"), begin_to_finish_doc); 584 "PLT.BeginToFinishDoc_LinkLoad", "CacheSize"), begin_to_finish_doc);
592 } 585 }
593 586
594 // Histograms to determine if cache throttling has an impact on PLT. 587 // Histograms to determine if cache throttling has an impact on PLT.
595 static bool use_cache_histogram2( 588 static const bool use_cache_histogram2 =
596 base::FieldTrialList::Find("CacheThrottle") && 589 base::FieldTrialList::TrialExists("CacheThrottle");
597 !base::FieldTrialList::Find("CacheThrottle")->group_name().empty());
598 if (use_cache_histogram2) { 590 if (use_cache_histogram2) {
599 UMA_HISTOGRAM_ENUMERATION( 591 UMA_HISTOGRAM_ENUMERATION(
600 base::FieldTrial::MakeName("PLT.Abandoned", "CacheThrottle"), 592 base::FieldTrial::MakeName("PLT.Abandoned", "CacheThrottle"),
601 abandoned_page ? 1 : 0, 2); 593 abandoned_page ? 1 : 0, 2);
602 switch (load_type) { 594 switch (load_type) {
603 case NavigationState::RELOAD: 595 case NavigationState::RELOAD:
604 PLT_HISTOGRAM(base::FieldTrial::MakeName( 596 PLT_HISTOGRAM(base::FieldTrial::MakeName(
605 "PLT.BeginToFinish_Reload", "CacheThrottle"), 597 "PLT.BeginToFinish_Reload", "CacheThrottle"),
606 begin_to_finish_all_loads); 598 begin_to_finish_all_loads);
607 break; 599 break;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 begin_to_finish_all_loads); 637 begin_to_finish_all_loads);
646 } 638 }
647 } 639 }
648 640
649 // For the SPDY field trials, we need to verify that the page loaded was 641 // For the SPDY field trials, we need to verify that the page loaded was
650 // the type we requested: 642 // the type we requested:
651 // if we asked for a SPDY request, we got a SPDY request 643 // if we asked for a SPDY request, we got a SPDY request
652 // if we asked for a HTTP request, we got a HTTP request 644 // if we asked for a HTTP request, we got a HTTP request
653 // Due to spdy version mismatches, it is possible that we ask for SPDY 645 // Due to spdy version mismatches, it is possible that we ask for SPDY
654 // but didn't get SPDY. 646 // but didn't get SPDY.
655 static bool use_spdy_histogram(base::FieldTrialList::Find("SpdyImpact") && 647 static const bool use_spdy_histogram =
656 !base::FieldTrialList::Find("SpdyImpact")->group_name().empty()); 648 base::FieldTrialList::TrialExists("SpdyImpact");
657 if (use_spdy_histogram) { 649 if (use_spdy_histogram) {
658 // We take extra effort to only compute these once. 650 // We take extra effort to only compute these once.
659 static bool in_spdy_trial = base::FieldTrialList::Find( 651 static bool in_spdy_trial = base::FieldTrialList::Find(
660 "SpdyImpact")->group_name() == "npn_with_spdy"; 652 "SpdyImpact")->group_name() == "npn_with_spdy";
661 static bool in_http_trial = base::FieldTrialList::Find( 653 static bool in_http_trial = base::FieldTrialList::Find(
662 "SpdyImpact")->group_name() == "npn_with_http"; 654 "SpdyImpact")->group_name() == "npn_with_http";
663 655
664 bool spdy_trial_success = navigation_state->was_fetched_via_spdy() ? 656 bool spdy_trial_success = navigation_state->was_fetched_via_spdy() ?
665 in_spdy_trial : in_http_trial; 657 in_spdy_trial : in_http_trial;
666 if (spdy_trial_success) { 658 if (spdy_trial_success) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 abandoned_page ? 1 : 0, 2); 795 abandoned_page ? 1 : 0, 2);
804 } else { 796 } else {
805 DCHECK(scheme_type == URLPattern::SCHEME_HTTP); 797 DCHECK(scheme_type == URLPattern::SCHEME_HTTP);
806 PLT_HISTOGRAM("PLT.StartToFinish.NoProxy.http", 798 PLT_HISTOGRAM("PLT.StartToFinish.NoProxy.http",
807 start_to_finish_all_loads); 799 start_to_finish_all_loads);
808 UMA_HISTOGRAM_ENUMERATION("PLT.Abandoned.NoProxy.http", 800 UMA_HISTOGRAM_ENUMERATION("PLT.Abandoned.NoProxy.http",
809 abandoned_page ? 1 : 0, 2); 801 abandoned_page ? 1 : 0, 2);
810 } 802 }
811 } 803 }
812 804
813 static bool false_start_trial(base::FieldTrialList::Find("SSLFalseStart") && 805 static const bool false_start_trial =
814 !base::FieldTrialList::Find("SSLFalseStart")->group_name().empty()); 806 base::FieldTrialList::TrialExists("SSLFalseStart");
815 if (false_start_trial) { 807 if (false_start_trial) {
816 if (scheme_type == URLPattern::SCHEME_HTTPS) { 808 if (scheme_type == URLPattern::SCHEME_HTTPS) {
817 switch (load_type) { 809 switch (load_type) {
818 case NavigationState::LINK_LOAD_NORMAL: 810 case NavigationState::LINK_LOAD_NORMAL:
819 PLT_HISTOGRAM(base::FieldTrial::MakeName( 811 PLT_HISTOGRAM(base::FieldTrial::MakeName(
820 "PLT.BeginToFinish_LinkLoadNormal", "SSLFalseStart"), 812 "PLT.BeginToFinish_LinkLoadNormal", "SSLFalseStart"),
821 begin_to_finish_all_loads); 813 begin_to_finish_all_loads);
822 break; 814 break;
823 case NavigationState::NORMAL_LOAD: 815 case NavigationState::NORMAL_LOAD:
824 PLT_HISTOGRAM(base::FieldTrial::MakeName( 816 PLT_HISTOGRAM(base::FieldTrial::MakeName(
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 886
895 DCHECK(state); 887 DCHECK(state);
896 DCHECK(ds); 888 DCHECK(ds);
897 GURL url(ds->request().url()); 889 GURL url(ds->request().url());
898 Time start = state->start_load_time(); 890 Time start = state->start_load_time();
899 Time finish = state->finish_load_time(); 891 Time finish = state->finish_load_time();
900 // TODO(mbelshe): should we log more stats? 892 // TODO(mbelshe): should we log more stats?
901 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " 893 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms "
902 << url.spec(); 894 << url.spec();
903 } 895 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698