OLD | NEW |
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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 PLT_HISTOGRAM("PLT.BeginToFinishDoc_LinkLoadCacheOnly", | 263 PLT_HISTOGRAM("PLT.BeginToFinishDoc_LinkLoadCacheOnly", |
264 begin_to_finish_doc); | 264 begin_to_finish_doc); |
265 PLT_HISTOGRAM("PLT.BeginToFinish_LinkLoadCacheOnly", | 265 PLT_HISTOGRAM("PLT.BeginToFinish_LinkLoadCacheOnly", |
266 begin_to_finish_all_loads); | 266 begin_to_finish_all_loads); |
267 break; | 267 break; |
268 default: | 268 default: |
269 break; | 269 break; |
270 } | 270 } |
271 | 271 |
272 // Histograms to determine if DNS prefetching has an impact on PLT. | 272 // Histograms to determine if DNS prefetching has an impact on PLT. |
273 static const bool use_dns_histogram = | 273 static bool use_dns_histogram(base::FieldTrialList::Find("DnsImpact") && |
274 base::FieldTrialList::TrialExists("DnsImpact"); | 274 !base::FieldTrialList::Find("DnsImpact")->group_name().empty()); |
275 if (use_dns_histogram) { | 275 if (use_dns_histogram) { |
276 UMA_HISTOGRAM_ENUMERATION( | 276 UMA_HISTOGRAM_ENUMERATION( |
277 base::FieldTrial::MakeName("PLT.Abandoned", "DnsImpact"), | 277 base::FieldTrial::MakeName("PLT.Abandoned", "DnsImpact"), |
278 abandoned_page ? 1 : 0, 2); | 278 abandoned_page ? 1 : 0, 2); |
279 UMA_HISTOGRAM_ENUMERATION( | 279 UMA_HISTOGRAM_ENUMERATION( |
280 base::FieldTrial::MakeName("PLT.LoadType", "DnsImpact"), | 280 base::FieldTrial::MakeName("PLT.LoadType", "DnsImpact"), |
281 load_type, NavigationState::kLoadTypeMax); | 281 load_type, NavigationState::kLoadTypeMax); |
282 switch (load_type) { | 282 switch (load_type) { |
283 case NavigationState::NORMAL_LOAD: | 283 case NavigationState::NORMAL_LOAD: |
284 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 284 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
(...skipping 15 matching lines...) Expand all Loading... |
300 "PLT.BeginToFinish_LinkLoadStaleOk", "DnsImpact"), | 300 "PLT.BeginToFinish_LinkLoadStaleOk", "DnsImpact"), |
301 begin_to_finish_all_loads); | 301 begin_to_finish_all_loads); |
302 break; | 302 break; |
303 default: | 303 default: |
304 break; | 304 break; |
305 } | 305 } |
306 } | 306 } |
307 | 307 |
308 // Histograms to determine if content prefetching has an impact on PLT. | 308 // Histograms to determine if content prefetching has an impact on PLT. |
309 static const bool prefetching_fieldtrial = | 309 static const bool prefetching_fieldtrial = |
310 base::FieldTrialList::TrialExists("Prefetch"); | 310 base::FieldTrialList::Find("Prefetch") && |
| 311 !base::FieldTrialList::Find("Prefetch")->group_name().empty(); |
311 if (prefetching_fieldtrial) { | 312 if (prefetching_fieldtrial) { |
312 if (navigation_state->was_prefetcher()) { | 313 if (navigation_state->was_prefetcher()) { |
313 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 314 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
314 "PLT.BeginToFinishDoc_ContentPrefetcher", "Prefetch"), | 315 "PLT.BeginToFinishDoc_ContentPrefetcher", "Prefetch"), |
315 begin_to_finish_doc); | 316 begin_to_finish_doc); |
316 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 317 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
317 "PLT.BeginToFinish_ContentPrefetcher", "Prefetch"), | 318 "PLT.BeginToFinish_ContentPrefetcher", "Prefetch"), |
318 begin_to_finish_all_loads); | 319 begin_to_finish_all_loads); |
319 } | 320 } |
320 if (navigation_state->was_referred_by_prefetcher()) { | 321 if (navigation_state->was_referred_by_prefetcher()) { |
321 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 322 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
322 "PLT.BeginToFinishDoc_ContentPrefetcherReferrer", "Prefetch"), | 323 "PLT.BeginToFinishDoc_ContentPrefetcherReferrer", "Prefetch"), |
323 begin_to_finish_doc); | 324 begin_to_finish_doc); |
324 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 325 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
325 "PLT.BeginToFinish_ContentPrefetcherReferrer", "Prefetch"), | 326 "PLT.BeginToFinish_ContentPrefetcherReferrer", "Prefetch"), |
326 begin_to_finish_all_loads); | 327 begin_to_finish_all_loads); |
327 } | 328 } |
328 UMA_HISTOGRAM_ENUMERATION(base::FieldTrial::MakeName( | 329 UMA_HISTOGRAM_ENUMERATION(base::FieldTrial::MakeName( |
329 "PLT.Abandoned", "Prefetch"), | 330 "PLT.Abandoned", "Prefetch"), |
330 abandoned_page ? 1 : 0, 2); | 331 abandoned_page ? 1 : 0, 2); |
331 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 332 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
332 "PLT.BeginToFinishDoc", "Prefetch"), | 333 "PLT.BeginToFinishDoc", "Prefetch"), |
333 begin_to_finish_doc); | 334 begin_to_finish_doc); |
334 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 335 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
335 "PLT.BeginToFinish", "Prefetch"), | 336 "PLT.BeginToFinish", "Prefetch"), |
336 begin_to_finish_all_loads); | 337 begin_to_finish_all_loads); |
337 } | 338 } |
338 | 339 |
339 // Histograms to determine if backup connection jobs have an impact on PLT. | 340 // Histograms to determine if backup connection jobs have an impact on PLT. |
340 static const bool connect_backup_jobs_fieldtrial = | 341 static const bool connect_backup_jobs_fieldtrial( |
341 base::FieldTrialList::TrialExists("ConnnectBackupJobs"); | 342 base::FieldTrialList::Find("ConnnectBackupJobs") && |
| 343 !base::FieldTrialList::Find("ConnnectBackupJobs")->group_name().empty()); |
342 if (connect_backup_jobs_fieldtrial) { | 344 if (connect_backup_jobs_fieldtrial) { |
343 UMA_HISTOGRAM_ENUMERATION( | 345 UMA_HISTOGRAM_ENUMERATION( |
344 base::FieldTrial::MakeName("PLT.Abandoned", "ConnnectBackupJobs"), | 346 base::FieldTrial::MakeName("PLT.Abandoned", "ConnnectBackupJobs"), |
345 abandoned_page ? 1 : 0, 2); | 347 abandoned_page ? 1 : 0, 2); |
346 UMA_HISTOGRAM_ENUMERATION( | 348 UMA_HISTOGRAM_ENUMERATION( |
347 base::FieldTrial::MakeName("PLT.LoadType", "ConnnectBackupJobs"), | 349 base::FieldTrial::MakeName("PLT.LoadType", "ConnnectBackupJobs"), |
348 load_type, NavigationState::kLoadTypeMax); | 350 load_type, NavigationState::kLoadTypeMax); |
349 switch (load_type) { | 351 switch (load_type) { |
350 case NavigationState::NORMAL_LOAD: | 352 case NavigationState::NORMAL_LOAD: |
351 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 353 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
(...skipping 17 matching lines...) Expand all Loading... |
369 break; | 371 break; |
370 default: | 372 default: |
371 break; | 373 break; |
372 } | 374 } |
373 } | 375 } |
374 | 376 |
375 // Histograms to determine if the number of connections has an | 377 // Histograms to determine if the number of connections has an |
376 // impact on PLT. | 378 // impact on PLT. |
377 // TODO(jar): Consider removing the per-link-type versions. We | 379 // TODO(jar): Consider removing the per-link-type versions. We |
378 // really only need LINK_LOAD_NORMAL and NORMAL_LOAD. | 380 // really only need LINK_LOAD_NORMAL and NORMAL_LOAD. |
379 static const bool use_connection_impact_histogram = | 381 static bool use_connection_impact_histogram( |
380 base::FieldTrialList::TrialExists("ConnCountImpact"); | 382 base::FieldTrialList::Find("ConnCountImpact") && |
| 383 !base::FieldTrialList::Find("ConnCountImpact")->group_name().empty()); |
381 if (use_connection_impact_histogram) { | 384 if (use_connection_impact_histogram) { |
382 UMA_HISTOGRAM_ENUMERATION( | 385 UMA_HISTOGRAM_ENUMERATION( |
383 base::FieldTrial::MakeName("PLT.Abandoned", "ConnCountImpact"), | 386 base::FieldTrial::MakeName("PLT.Abandoned", "ConnCountImpact"), |
384 abandoned_page ? 1 : 0, 2); | 387 abandoned_page ? 1 : 0, 2); |
385 switch (load_type) { | 388 switch (load_type) { |
386 case NavigationState::NORMAL_LOAD: | 389 case NavigationState::NORMAL_LOAD: |
387 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 390 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
388 "PLT.BeginToFinish_NormalLoad", "ConnCountImpact"), | 391 "PLT.BeginToFinish_NormalLoad", "ConnCountImpact"), |
389 begin_to_finish_all_loads); | 392 begin_to_finish_all_loads); |
390 break; | 393 break; |
(...skipping 11 matching lines...) Expand all Loading... |
402 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 405 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
403 "PLT.BeginToFinish_LinkLoadStaleOk", "ConnCountImpact"), | 406 "PLT.BeginToFinish_LinkLoadStaleOk", "ConnCountImpact"), |
404 begin_to_finish_all_loads); | 407 begin_to_finish_all_loads); |
405 break; | 408 break; |
406 default: | 409 default: |
407 break; | 410 break; |
408 } | 411 } |
409 } | 412 } |
410 | 413 |
411 // Histograms to determine effect of idle socket timeout. | 414 // Histograms to determine effect of idle socket timeout. |
412 static const bool use_idle_socket_timeout_histogram = | 415 static bool use_idle_socket_timeout_histogram( |
413 base::FieldTrialList::TrialExists("IdleSktToImpact"); | 416 base::FieldTrialList::Find("IdleSktToImpact") && |
| 417 !base::FieldTrialList::Find("IdleSktToImpact")->group_name().empty()); |
414 if (use_idle_socket_timeout_histogram) { | 418 if (use_idle_socket_timeout_histogram) { |
415 UMA_HISTOGRAM_ENUMERATION( | 419 UMA_HISTOGRAM_ENUMERATION( |
416 base::FieldTrial::MakeName("PLT.Abandoned", "IdleSktToImpact"), | 420 base::FieldTrial::MakeName("PLT.Abandoned", "IdleSktToImpact"), |
417 abandoned_page ? 1 : 0, 2); | 421 abandoned_page ? 1 : 0, 2); |
418 switch (load_type) { | 422 switch (load_type) { |
419 case NavigationState::NORMAL_LOAD: | 423 case NavigationState::NORMAL_LOAD: |
420 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 424 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
421 "PLT.BeginToFinish_NormalLoad", "IdleSktToImpact"), | 425 "PLT.BeginToFinish_NormalLoad", "IdleSktToImpact"), |
422 begin_to_finish_all_loads); | 426 begin_to_finish_all_loads); |
423 break; | 427 break; |
(...skipping 11 matching lines...) Expand all Loading... |
435 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 439 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
436 "PLT.BeginToFinish_LinkLoadStaleOk", "IdleSktToImpact"), | 440 "PLT.BeginToFinish_LinkLoadStaleOk", "IdleSktToImpact"), |
437 begin_to_finish_all_loads); | 441 begin_to_finish_all_loads); |
438 break; | 442 break; |
439 default: | 443 default: |
440 break; | 444 break; |
441 } | 445 } |
442 } | 446 } |
443 | 447 |
444 // Histograms to determine effect of number of connections per proxy. | 448 // Histograms to determine effect of number of connections per proxy. |
445 static const bool use_proxy_connection_impact_histogram = | 449 static bool use_proxy_connection_impact_histogram( |
446 base::FieldTrialList::TrialExists("ProxyConnectionImpact"); | 450 base::FieldTrialList::Find("ProxyConnectionImpact") && |
| 451 !base::FieldTrialList::Find( |
| 452 "ProxyConnectionImpact")->group_name().empty()); |
447 if (use_proxy_connection_impact_histogram) { | 453 if (use_proxy_connection_impact_histogram) { |
448 UMA_HISTOGRAM_ENUMERATION( | 454 UMA_HISTOGRAM_ENUMERATION( |
449 base::FieldTrial::MakeName("PLT.Abandoned", "ProxyConnectionImpact"), | 455 base::FieldTrial::MakeName("PLT.Abandoned", "ProxyConnectionImpact"), |
450 abandoned_page ? 1 : 0, 2); | 456 abandoned_page ? 1 : 0, 2); |
451 switch (load_type) { | 457 switch (load_type) { |
452 case NavigationState::NORMAL_LOAD: | 458 case NavigationState::NORMAL_LOAD: |
453 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 459 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
454 "PLT.BeginToFinish_NormalLoad", "ProxyConnectionImpact"), | 460 "PLT.BeginToFinish_NormalLoad", "ProxyConnectionImpact"), |
455 begin_to_finish_all_loads); | 461 begin_to_finish_all_loads); |
456 break; | 462 break; |
(...skipping 12 matching lines...) Expand all Loading... |
469 "PLT.BeginToFinish_LinkLoadStaleOk", "ProxyConnectionImpact"), | 475 "PLT.BeginToFinish_LinkLoadStaleOk", "ProxyConnectionImpact"), |
470 begin_to_finish_all_loads); | 476 begin_to_finish_all_loads); |
471 break; | 477 break; |
472 default: | 478 default: |
473 break; | 479 break; |
474 } | 480 } |
475 } | 481 } |
476 | 482 |
477 // Histograms to determine if SDCH has an impact. | 483 // Histograms to determine if SDCH has an impact. |
478 // TODO(jar): Consider removing per-link load types and the enumeration. | 484 // TODO(jar): Consider removing per-link load types and the enumeration. |
479 static const bool use_sdch_histogram = | 485 static bool use_sdch_histogram(base::FieldTrialList::Find("GlobalSdch") && |
480 base::FieldTrialList::TrialExists("GlobalSdch"); | 486 !base::FieldTrialList::Find("GlobalSdch")->group_name().empty()); |
481 if (use_sdch_histogram) { | 487 if (use_sdch_histogram) { |
482 UMA_HISTOGRAM_ENUMERATION( | 488 UMA_HISTOGRAM_ENUMERATION( |
483 base::FieldTrial::MakeName("PLT.LoadType", "GlobalSdch"), | 489 base::FieldTrial::MakeName("PLT.LoadType", "GlobalSdch"), |
484 load_type, NavigationState::kLoadTypeMax); | 490 load_type, NavigationState::kLoadTypeMax); |
485 switch (load_type) { | 491 switch (load_type) { |
486 case NavigationState::NORMAL_LOAD: | 492 case NavigationState::NORMAL_LOAD: |
487 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 493 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
488 "PLT.BeginToFinish_NormalLoad", "GlobalSdch"), | 494 "PLT.BeginToFinish_NormalLoad", "GlobalSdch"), |
489 begin_to_finish_all_loads); | 495 begin_to_finish_all_loads); |
490 break; | 496 break; |
(...skipping 16 matching lines...) Expand all Loading... |
507 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 513 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
508 "PLT.BeginToFinish_LinkLoadCacheOnly", "GlobalSdch"), | 514 "PLT.BeginToFinish_LinkLoadCacheOnly", "GlobalSdch"), |
509 begin_to_finish_all_loads); | 515 begin_to_finish_all_loads); |
510 break; | 516 break; |
511 default: | 517 default: |
512 break; | 518 break; |
513 } | 519 } |
514 } | 520 } |
515 | 521 |
516 // Histograms to determine if cache size has an impact on PLT. | 522 // Histograms to determine if cache size has an impact on PLT. |
517 static const bool use_cache_histogram1 = | 523 static bool use_cache_histogram1(base::FieldTrialList::Find("CacheSize") && |
518 base::FieldTrialList::TrialExists("CacheSize"); | 524 !base::FieldTrialList::Find("CacheSize")->group_name().empty()); |
519 if (use_cache_histogram1 && NavigationState::LINK_LOAD_NORMAL <= load_type && | 525 if (use_cache_histogram1 && NavigationState::LINK_LOAD_NORMAL <= load_type && |
520 NavigationState::LINK_LOAD_CACHE_ONLY >= load_type) { | 526 NavigationState::LINK_LOAD_CACHE_ONLY >= load_type) { |
521 // TODO(mbelshe): Do we really want BeginToFinishDoc here? It seems like | 527 // TODO(mbelshe): Do we really want BeginToFinishDoc here? It seems like |
522 // StartToFinish or BeginToFinish would be better. | 528 // StartToFinish or BeginToFinish would be better. |
523 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 529 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
524 "PLT.BeginToFinishDoc_LinkLoad", "CacheSize"), begin_to_finish_doc); | 530 "PLT.BeginToFinishDoc_LinkLoad", "CacheSize"), begin_to_finish_doc); |
525 } | 531 } |
526 | 532 |
527 // Histograms to determine if cache throttling has an impact on PLT. | 533 // Histograms to determine if cache throttling has an impact on PLT. |
528 static const bool use_cache_histogram2 = | 534 static bool use_cache_histogram2( |
529 base::FieldTrialList::TrialExists("CacheThrottle"); | 535 base::FieldTrialList::Find("CacheThrottle") && |
| 536 !base::FieldTrialList::Find("CacheThrottle")->group_name().empty()); |
530 if (use_cache_histogram2) { | 537 if (use_cache_histogram2) { |
531 UMA_HISTOGRAM_ENUMERATION( | 538 UMA_HISTOGRAM_ENUMERATION( |
532 base::FieldTrial::MakeName("PLT.Abandoned", "CacheThrottle"), | 539 base::FieldTrial::MakeName("PLT.Abandoned", "CacheThrottle"), |
533 abandoned_page ? 1 : 0, 2); | 540 abandoned_page ? 1 : 0, 2); |
534 switch (load_type) { | 541 switch (load_type) { |
535 case NavigationState::RELOAD: | 542 case NavigationState::RELOAD: |
536 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 543 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
537 "PLT.BeginToFinish_Reload", "CacheThrottle"), | 544 "PLT.BeginToFinish_Reload", "CacheThrottle"), |
538 begin_to_finish_all_loads); | 545 begin_to_finish_all_loads); |
539 break; | 546 break; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 begin_to_finish_all_loads); | 584 begin_to_finish_all_loads); |
578 } | 585 } |
579 } | 586 } |
580 | 587 |
581 // For the SPDY field trials, we need to verify that the page loaded was | 588 // For the SPDY field trials, we need to verify that the page loaded was |
582 // the type we requested: | 589 // the type we requested: |
583 // if we asked for a SPDY request, we got a SPDY request | 590 // if we asked for a SPDY request, we got a SPDY request |
584 // if we asked for a HTTP request, we got a HTTP request | 591 // if we asked for a HTTP request, we got a HTTP request |
585 // Due to spdy version mismatches, it is possible that we ask for SPDY | 592 // Due to spdy version mismatches, it is possible that we ask for SPDY |
586 // but didn't get SPDY. | 593 // but didn't get SPDY. |
587 static const bool use_spdy_histogram = | 594 static bool use_spdy_histogram(base::FieldTrialList::Find("SpdyImpact") && |
588 base::FieldTrialList::TrialExists("SpdyImpact"); | 595 !base::FieldTrialList::Find("SpdyImpact")->group_name().empty()); |
589 if (use_spdy_histogram) { | 596 if (use_spdy_histogram) { |
590 // We take extra effort to only compute these once. | 597 // We take extra effort to only compute these once. |
591 static bool in_spdy_trial = base::FieldTrialList::Find( | 598 static bool in_spdy_trial = base::FieldTrialList::Find( |
592 "SpdyImpact")->group_name() == "npn_with_spdy"; | 599 "SpdyImpact")->group_name() == "npn_with_spdy"; |
593 static bool in_http_trial = base::FieldTrialList::Find( | 600 static bool in_http_trial = base::FieldTrialList::Find( |
594 "SpdyImpact")->group_name() == "npn_with_http"; | 601 "SpdyImpact")->group_name() == "npn_with_http"; |
595 | 602 |
596 bool spdy_trial_success = navigation_state->was_fetched_via_spdy() ? | 603 bool spdy_trial_success = navigation_state->was_fetched_via_spdy() ? |
597 in_spdy_trial : in_http_trial; | 604 in_spdy_trial : in_http_trial; |
598 if (spdy_trial_success) { | 605 if (spdy_trial_success) { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 abandoned_page ? 1 : 0, 2); | 742 abandoned_page ? 1 : 0, 2); |
736 } else { | 743 } else { |
737 DCHECK(scheme_type == URLPattern::SCHEME_HTTP); | 744 DCHECK(scheme_type == URLPattern::SCHEME_HTTP); |
738 PLT_HISTOGRAM("PLT.StartToFinish.NoProxy.http", | 745 PLT_HISTOGRAM("PLT.StartToFinish.NoProxy.http", |
739 start_to_finish_all_loads); | 746 start_to_finish_all_loads); |
740 UMA_HISTOGRAM_ENUMERATION("PLT.Abandoned.NoProxy.http", | 747 UMA_HISTOGRAM_ENUMERATION("PLT.Abandoned.NoProxy.http", |
741 abandoned_page ? 1 : 0, 2); | 748 abandoned_page ? 1 : 0, 2); |
742 } | 749 } |
743 } | 750 } |
744 | 751 |
745 static const bool false_start_trial = | 752 static bool false_start_trial(base::FieldTrialList::Find("SSLFalseStart") && |
746 base::FieldTrialList::TrialExists("SSLFalseStart"); | 753 !base::FieldTrialList::Find("SSLFalseStart")->group_name().empty()); |
747 if (false_start_trial) { | 754 if (false_start_trial) { |
748 if (scheme_type == URLPattern::SCHEME_HTTPS) { | 755 if (scheme_type == URLPattern::SCHEME_HTTPS) { |
749 switch (load_type) { | 756 switch (load_type) { |
750 case NavigationState::LINK_LOAD_NORMAL: | 757 case NavigationState::LINK_LOAD_NORMAL: |
751 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 758 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
752 "PLT.BeginToFinish_LinkLoadNormal", "SSLFalseStart"), | 759 "PLT.BeginToFinish_LinkLoadNormal", "SSLFalseStart"), |
753 begin_to_finish_all_loads); | 760 begin_to_finish_all_loads); |
754 break; | 761 break; |
755 case NavigationState::NORMAL_LOAD: | 762 case NavigationState::NORMAL_LOAD: |
756 PLT_HISTOGRAM(base::FieldTrial::MakeName( | 763 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 | 838 |
832 DCHECK(state); | 839 DCHECK(state); |
833 DCHECK(ds); | 840 DCHECK(ds); |
834 GURL url(ds->request().url()); | 841 GURL url(ds->request().url()); |
835 Time start = state->start_load_time(); | 842 Time start = state->start_load_time(); |
836 Time finish = state->finish_load_time(); | 843 Time finish = state->finish_load_time(); |
837 // TODO(mbelshe): should we log more stats? | 844 // TODO(mbelshe): should we log more stats? |
838 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " | 845 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " |
839 << url.spec(); | 846 << url.spec(); |
840 } | 847 } |
OLD | NEW |