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

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

Issue 1363673004: [DRP] Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing tbansal comments Created 5 years, 2 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
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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/metrics/field_trial.h" 12 #include "base/metrics/field_trial.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/string_split.h" 15 #include "base/strings/string_split.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chrome/renderer/chrome_content_renderer_client.h" 21 #include "chrome/renderer/chrome_content_renderer_client.h"
22 #include "chrome/renderer/searchbox/search_bouncer.h" 22 #include "chrome/renderer/searchbox/search_bouncer.h"
23 #include "components/data_reduction_proxy/content/common/data_reduction_proxy_me ssages.h" 23 #include "components/data_reduction_proxy/content/common/data_reduction_proxy_me ssages.h"
24 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h"
24 #include "content/public/common/content_constants.h" 25 #include "content/public/common/content_constants.h"
25 #include "content/public/renderer/document_state.h" 26 #include "content/public/renderer/document_state.h"
27 #include "content/public/renderer/render_frame.h"
26 #include "content/public/renderer/render_thread.h" 28 #include "content/public/renderer/render_thread.h"
27 #include "content/public/renderer/render_view.h" 29 #include "content/public/renderer/render_view.h"
28 #include "extensions/common/url_pattern.h" 30 #include "extensions/common/url_pattern.h"
29 #include "net/base/url_util.h" 31 #include "net/base/url_util.h"
30 #include "net/http/http_response_headers.h" 32 #include "net/http/http_response_headers.h"
31 #include "third_party/WebKit/public/platform/WebURLRequest.h" 33 #include "third_party/WebKit/public/platform/WebURLRequest.h"
32 #include "third_party/WebKit/public/platform/WebURLResponse.h" 34 #include "third_party/WebKit/public/platform/WebURLResponse.h"
33 #include "third_party/WebKit/public/web/WebDocument.h" 35 #include "third_party/WebKit/public/web/WebDocument.h"
34 #include "third_party/WebKit/public/web/WebFrame.h" 36 #include "third_party/WebKit/public/web/WebFrame.h"
35 #include "third_party/WebKit/public/web/WebPerformance.h" 37 #include "third_party/WebKit/public/web/WebPerformance.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 return kNoExperiment; 211 return kNoExperiment;
210 212
211 int experiment_id; 213 int experiment_id;
212 if (!base::StringToInt(value, &experiment_id)) 214 if (!base::StringToInt(value, &experiment_id))
213 return kNoExperiment; 215 return kNoExperiment;
214 if (0 < experiment_id && experiment_id <= kMaxExperimentID) 216 if (0 < experiment_id && experiment_id <= kMaxExperimentID)
215 return experiment_id; 217 return experiment_id;
216 return kNoExperiment; 218 return kNoExperiment;
217 } 219 }
218 220
219 void DumpHistograms(const WebPerformance& performance, 221 void DumpHistograms(
220 DocumentState* document_state, 222 const WebPerformance& performance,
221 bool data_reduction_proxy_was_used, 223 DocumentState* document_state,
222 data_reduction_proxy::LoFiStatus lofi_status, 224 bool data_reduction_proxy_was_used,
223 bool came_from_websearch, 225 bool lofi_on /* Whether the frame used the Lo-Fi request header. */,
tbansal1 2015/09/29 00:47:48 Is this correct? Are the users in control group us
megjablon 2015/09/29 02:38:38 How about a different description? I don't like th
224 int websearch_chrome_joint_experiment_id, 226 bool came_from_websearch,
225 bool is_preview, 227 int websearch_chrome_joint_experiment_id,
226 URLPattern::SchemeMasks scheme_type) { 228 bool is_preview,
229 URLPattern::SchemeMasks scheme_type) {
227 // This function records new histograms based on the Navigation Timing 230 // This function records new histograms based on the Navigation Timing
228 // records. As such, the histograms should not depend on the deprecated timing 231 // records. As such, the histograms should not depend on the deprecated timing
229 // information collected in DocumentState. However, here for some reason we 232 // information collected in DocumentState. However, here for some reason we
230 // check if document_state->request_time() is null. TODO(ppi): find out why 233 // check if document_state->request_time() is null. TODO(ppi): find out why
231 // and remove DocumentState from the parameter list. 234 // and remove DocumentState from the parameter list.
232 Time request = document_state->request_time(); 235 Time request = document_state->request_time();
233 236
234 Time navigation_start = Time::FromDoubleT(performance.navigationStart()); 237 Time navigation_start = Time::FromDoubleT(performance.navigationStart());
235 Time redirect_start = Time::FromDoubleT(performance.redirectStart()); 238 Time redirect_start = Time::FromDoubleT(performance.redirectStart());
236 Time redirect_end = Time::FromDoubleT(performance.redirectEnd()); 239 Time redirect_end = Time::FromDoubleT(performance.redirectEnd());
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 load_event_end - navigation_start, 407 load_event_end - navigation_start,
405 came_from_websearch, 408 came_from_websearch,
406 websearch_chrome_joint_experiment_id, 409 websearch_chrome_joint_experiment_id,
407 is_preview); 410 is_preview);
408 PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_StartToFinish", 411 PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_StartToFinish",
409 load_event_end - request_start, 412 load_event_end - request_start,
410 came_from_websearch, 413 came_from_websearch,
411 websearch_chrome_joint_experiment_id, 414 websearch_chrome_joint_experiment_id,
412 is_preview); 415 is_preview);
413 if (data_reduction_proxy_was_used) { 416 if (data_reduction_proxy_was_used) {
417 bool in_lofi_enabled_group =
418 data_reduction_proxy::params::IsIncludedInLoFiEnabledFieldTrial();
419 bool in_lofi_control_group =
420 data_reduction_proxy::params::IsIncludedInLoFiControlFieldTrial();
414 if ((scheme_type & URLPattern::SCHEME_HTTPS) == 0) { 421 if ((scheme_type & URLPattern::SCHEME_HTTPS) == 0) {
415 PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy", 422 PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy",
416 load_event_end - begin); 423 load_event_end - begin);
417 PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy", 424 PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy",
418 load_event_end - response_start); 425 load_event_end - response_start);
419 PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy", 426 PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy",
420 load_event_end - navigation_start); 427 load_event_end - navigation_start);
421 PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy", 428 PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy",
422 load_event_end - request_start); 429 load_event_end - request_start);
423 if (lofi_status == data_reduction_proxy::LOFI_STATUS_ACTIVE) { 430 if (lofi_on && in_lofi_enabled_group) {
424 PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_AutoLoFiOn", 431 PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_AutoLoFiOn",
425 load_event_end - begin); 432 load_event_end - begin);
426 PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_AutoLoFiOn", 433 PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_AutoLoFiOn",
427 load_event_end - response_start); 434 load_event_end - response_start);
428 PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_AutoLoFiOn", 435 PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_AutoLoFiOn",
429 load_event_end - navigation_start); 436 load_event_end - navigation_start);
430 PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_AutoLoFiOn", 437 PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_AutoLoFiOn",
431 load_event_end - request_start); 438 load_event_end - request_start);
432 if (!first_paint.is_null()) { 439 if (!first_paint.is_null()) {
433 PLT_HISTOGRAM("PLT.BeginToFirstPaint_DataReductionProxy_AutoLoFiOn", 440 PLT_HISTOGRAM("PLT.BeginToFirstPaint_DataReductionProxy_AutoLoFiOn",
434 first_paint - begin); 441 first_paint - begin);
435 } 442 }
436 } else if (lofi_status == 443 } else if (lofi_on && in_lofi_control_group) {
437 data_reduction_proxy::LOFI_STATUS_ACTIVE_CONTROL) {
438 PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_AutoLoFiOff", 444 PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_AutoLoFiOff",
439 load_event_end - begin); 445 load_event_end - begin);
440 PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_AutoLoFiOff", 446 PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_AutoLoFiOff",
441 load_event_end - response_start); 447 load_event_end - response_start);
442 PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_AutoLoFiOff", 448 PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_AutoLoFiOff",
443 load_event_end - navigation_start); 449 load_event_end - navigation_start);
444 PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_AutoLoFiOff", 450 PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_AutoLoFiOff",
445 load_event_end - request_start); 451 load_event_end - request_start);
446 if (!first_paint.is_null()) { 452 if (!first_paint.is_null()) {
447 PLT_HISTOGRAM( 453 PLT_HISTOGRAM(
448 "PLT.BeginToFirstPaint_DataReductionProxy_AutoLoFiOff", 454 "PLT.BeginToFirstPaint_DataReductionProxy_AutoLoFiOff",
449 first_paint - begin); 455 first_paint - begin);
450 } 456 }
451 } 457 }
452 } else { 458 } else {
453 PLT_HISTOGRAM("PLT.PT_BeginToFinish_HTTPS_DataReductionProxy", 459 PLT_HISTOGRAM("PLT.PT_BeginToFinish_HTTPS_DataReductionProxy",
454 load_event_end - begin); 460 load_event_end - begin);
455 PLT_HISTOGRAM("PLT.PT_CommitToFinish_HTTPS_DataReductionProxy", 461 PLT_HISTOGRAM("PLT.PT_CommitToFinish_HTTPS_DataReductionProxy",
456 load_event_end - response_start); 462 load_event_end - response_start);
457 PLT_HISTOGRAM("PLT.PT_RequestToFinish_HTTPS_DataReductionProxy", 463 PLT_HISTOGRAM("PLT.PT_RequestToFinish_HTTPS_DataReductionProxy",
458 load_event_end - navigation_start); 464 load_event_end - navigation_start);
459 PLT_HISTOGRAM("PLT.PT_StartToFinish_HTTPS_DataReductionProxy", 465 PLT_HISTOGRAM("PLT.PT_StartToFinish_HTTPS_DataReductionProxy",
460 load_event_end - request_start); 466 load_event_end - request_start);
461 if (lofi_status == data_reduction_proxy::LOFI_STATUS_ACTIVE) { 467 if (lofi_on && in_lofi_enabled_group) {
462 PLT_HISTOGRAM( 468 PLT_HISTOGRAM(
463 "PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_AutoLoFiOn", 469 "PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_AutoLoFiOn",
464 load_event_end - begin); 470 load_event_end - begin);
465 PLT_HISTOGRAM( 471 PLT_HISTOGRAM(
466 "PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_AutoLoFiOn", 472 "PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_AutoLoFiOn",
467 load_event_end - response_start); 473 load_event_end - response_start);
468 PLT_HISTOGRAM( 474 PLT_HISTOGRAM(
469 "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_AutoLoFiOn", 475 "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_AutoLoFiOn",
470 load_event_end - navigation_start); 476 load_event_end - navigation_start);
471 PLT_HISTOGRAM( 477 PLT_HISTOGRAM(
472 "PLT.PT_StartToFinish_HTTPS_DataReductionProxy_AutoLoFiOn", 478 "PLT.PT_StartToFinish_HTTPS_DataReductionProxy_AutoLoFiOn",
473 load_event_end - request_start); 479 load_event_end - request_start);
474 if (!first_paint.is_null()) { 480 if (!first_paint.is_null()) {
475 PLT_HISTOGRAM( 481 PLT_HISTOGRAM(
476 "PLT.BeginToFirstPaint_HTTPS_DataReductionProxy_AutoLoFiOn", 482 "PLT.BeginToFirstPaint_HTTPS_DataReductionProxy_AutoLoFiOn",
477 first_paint - begin); 483 first_paint - begin);
478 } 484 }
479 } else if (lofi_status == 485 } else if (lofi_on && in_lofi_control_group) {
480 data_reduction_proxy::LOFI_STATUS_ACTIVE_CONTROL) {
481 PLT_HISTOGRAM( 486 PLT_HISTOGRAM(
482 "PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_AutoLoFiOff", 487 "PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_AutoLoFiOff",
483 load_event_end - begin); 488 load_event_end - begin);
484 PLT_HISTOGRAM( 489 PLT_HISTOGRAM(
485 "PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_AutoLoFiOff", 490 "PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_AutoLoFiOff",
486 load_event_end - response_start); 491 load_event_end - response_start);
487 PLT_HISTOGRAM( 492 PLT_HISTOGRAM(
488 "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_AutoLoFiOff", 493 "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_AutoLoFiOff",
489 load_event_end - navigation_start); 494 load_event_end - navigation_start);
490 PLT_HISTOGRAM( 495 PLT_HISTOGRAM(
(...skipping 26 matching lines...) Expand all
517 } 522 }
518 } 523 }
519 } 524 }
520 if (!dom_content_loaded_start.is_null()) { 525 if (!dom_content_loaded_start.is_null()) {
521 PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_RequestToDomContentLoaded", 526 PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_RequestToDomContentLoaded",
522 dom_content_loaded_start - navigation_start, 527 dom_content_loaded_start - navigation_start,
523 came_from_websearch, 528 came_from_websearch,
524 websearch_chrome_joint_experiment_id, 529 websearch_chrome_joint_experiment_id,
525 is_preview); 530 is_preview);
526 if (data_reduction_proxy_was_used) { 531 if (data_reduction_proxy_was_used) {
532 bool in_lofi_enabled_group =
533 data_reduction_proxy::params::IsIncludedInLoFiEnabledFieldTrial();
534 bool in_lofi_control_group =
535 data_reduction_proxy::params::IsIncludedInLoFiControlFieldTrial();
527 if ((scheme_type & URLPattern::SCHEME_HTTPS) == 0) { 536 if ((scheme_type & URLPattern::SCHEME_HTTPS) == 0) {
528 PLT_HISTOGRAM("PLT.PT_RequestToDomContentLoaded_DataReductionProxy", 537 PLT_HISTOGRAM("PLT.PT_RequestToDomContentLoaded_DataReductionProxy",
529 dom_content_loaded_start - navigation_start); 538 dom_content_loaded_start - navigation_start);
530 if (lofi_status == data_reduction_proxy::LOFI_STATUS_ACTIVE) { 539 if (lofi_on && in_lofi_enabled_group) {
531 PLT_HISTOGRAM( 540 PLT_HISTOGRAM(
532 "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_AutoLoFiOn", 541 "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_AutoLoFiOn",
533 dom_content_loaded_start - navigation_start); 542 dom_content_loaded_start - navigation_start);
534 } else if (lofi_status == 543 } else if (lofi_on && in_lofi_control_group) {
535 data_reduction_proxy::LOFI_STATUS_ACTIVE_CONTROL) {
536 PLT_HISTOGRAM( 544 PLT_HISTOGRAM(
537 "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_AutoLoFiOff", 545 "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_AutoLoFiOff",
538 dom_content_loaded_start - navigation_start); 546 dom_content_loaded_start - navigation_start);
539 } 547 }
540 } else { 548 } else {
541 PLT_HISTOGRAM( 549 PLT_HISTOGRAM(
542 "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy", 550 "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy",
543 dom_content_loaded_start - navigation_start); 551 dom_content_loaded_start - navigation_start);
544 if (lofi_status == data_reduction_proxy::LOFI_STATUS_ACTIVE) { 552 if (lofi_on && in_lofi_enabled_group) {
545 PLT_HISTOGRAM( 553 PLT_HISTOGRAM(
546 "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_" 554 "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_"
547 "AutoLoFiOn", 555 "AutoLoFiOn",
548 dom_content_loaded_start - navigation_start); 556 dom_content_loaded_start - navigation_start);
549 } else if (lofi_status == 557 } else if (lofi_on && in_lofi_control_group) {
550 data_reduction_proxy::LOFI_STATUS_ACTIVE_CONTROL) {
551 PLT_HISTOGRAM( 558 PLT_HISTOGRAM(
552 "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_" 559 "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_"
553 "AutoLoFiOff", 560 "AutoLoFiOff",
554 dom_content_loaded_start - navigation_start); 561 dom_content_loaded_start - navigation_start);
555 } 562 }
556 } 563 }
557 } 564 }
558 } 565 }
559 PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_BeginToCommit", 566 PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_BeginToCommit",
560 response_start - begin, 567 response_start - begin,
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 if (!ShouldDump(frame)) 878 if (!ShouldDump(frame))
872 return; 879 return;
873 880
874 URLPattern::SchemeMasks scheme_type = 881 URLPattern::SchemeMasks scheme_type =
875 GetSupportedSchemeType(frame->document().url()); 882 GetSupportedSchemeType(frame->document().url());
876 883
877 DocumentState* document_state = 884 DocumentState* document_state =
878 DocumentState::FromDataSource(frame->dataSource()); 885 DocumentState::FromDataSource(frame->dataSource());
879 886
880 bool data_reduction_proxy_was_used = false; 887 bool data_reduction_proxy_was_used = false;
881 data_reduction_proxy::LoFiStatus lofi_status =
882 data_reduction_proxy::LOFI_STATUS_TEMPORARILY_OFF;
883 if (!document_state->proxy_server().IsEmpty()) { 888 if (!document_state->proxy_server().IsEmpty()) {
884 bool handled = 889 bool handled =
885 Send(new DataReductionProxyViewHostMsg_DataReductionProxyStatus( 890 Send(new DataReductionProxyViewHostMsg_IsDataReductionProxy(
886 document_state->proxy_server(), &data_reduction_proxy_was_used, 891 document_state->proxy_server(), &data_reduction_proxy_was_used));
887 &lofi_status));
888 // If the IPC call is not handled, then |data_reduction_proxy_was_used| 892 // If the IPC call is not handled, then |data_reduction_proxy_was_used|
889 // should remain |false|. 893 // should remain |false|.
890 DCHECK(handled || !data_reduction_proxy_was_used); 894 DCHECK(handled || !data_reduction_proxy_was_used);
891 } 895 }
892 896
893 bool came_from_websearch = 897 bool came_from_websearch =
894 IsFromGoogleSearchResult(frame->document().url(), 898 IsFromGoogleSearchResult(frame->document().url(),
895 GURL(frame->document().referrer())); 899 GURL(frame->document().referrer()));
896 int websearch_chrome_joint_experiment_id = kNoExperiment; 900 int websearch_chrome_joint_experiment_id = kNoExperiment;
897 bool is_preview = false; 901 bool is_preview = false;
898 if (came_from_websearch) { 902 if (came_from_websearch) {
899 websearch_chrome_joint_experiment_id = 903 websearch_chrome_joint_experiment_id =
900 GetQueryStringBasedExperiment(GURL(frame->document().referrer())); 904 GetQueryStringBasedExperiment(GURL(frame->document().referrer()));
901 is_preview = ViaHeaderContains(frame, "1.1 Google Instant Proxy Preview"); 905 is_preview = ViaHeaderContains(frame, "1.1 Google Instant Proxy Preview");
902 } 906 }
903 907
904 MaybeDumpFirstLayoutHistograms(); 908 MaybeDumpFirstLayoutHistograms();
905 909
906 // Metrics based on the timing information recorded for the Navigation Timing 910 // Metrics based on the timing information recorded for the Navigation Timing
907 // API - http://www.w3.org/TR/navigation-timing/. 911 // API - http://www.w3.org/TR/navigation-timing/.
908 DumpHistograms(frame->performance(), document_state, 912 DumpHistograms(
909 data_reduction_proxy_was_used, lofi_status, 913 frame->performance(), document_state, data_reduction_proxy_was_used,
910 came_from_websearch, websearch_chrome_joint_experiment_id, 914 false /* TODO: render_frame->IsLoFiOn() */, came_from_websearch,
911 is_preview, scheme_type); 915 websearch_chrome_joint_experiment_id, is_preview, scheme_type);
912 916
913 // Old metrics based on the timing information stored in DocumentState. These 917 // Old metrics based on the timing information stored in DocumentState. These
914 // are deprecated and should go away. 918 // are deprecated and should go away.
915 DumpDeprecatedHistograms(frame->performance(), document_state, 919 DumpDeprecatedHistograms(frame->performance(), document_state,
916 data_reduction_proxy_was_used, 920 data_reduction_proxy_was_used,
917 came_from_websearch, 921 came_from_websearch,
918 websearch_chrome_joint_experiment_id, 922 websearch_chrome_joint_experiment_id,
919 is_preview, 923 is_preview,
920 scheme_type); 924 scheme_type);
921 925
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 1024
1021 DCHECK(document_state); 1025 DCHECK(document_state);
1022 DCHECK(ds); 1026 DCHECK(ds);
1023 GURL url(ds->request().url()); 1027 GURL url(ds->request().url());
1024 Time start = document_state->start_load_time(); 1028 Time start = document_state->start_load_time();
1025 Time finish = document_state->finish_load_time(); 1029 Time finish = document_state->finish_load_time();
1026 // TODO(mbelshe): should we log more stats? 1030 // TODO(mbelshe): should we log more stats?
1027 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " 1031 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms "
1028 << url.spec(); 1032 << url.spec();
1029 } 1033 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698