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