OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 abandoned_page ? 1 : 0, 2); | 789 abandoned_page ? 1 : 0, 2); |
790 } else { | 790 } else { |
791 DCHECK(scheme_type == URLPattern::SCHEME_HTTP); | 791 DCHECK(scheme_type == URLPattern::SCHEME_HTTP); |
792 PLT_HISTOGRAM("PLT.StartToFinish.NoProxy.http", | 792 PLT_HISTOGRAM("PLT.StartToFinish.NoProxy.http", |
793 start_to_finish_all_loads); | 793 start_to_finish_all_loads); |
794 UMA_HISTOGRAM_ENUMERATION("PLT.Abandoned.NoProxy.http", | 794 UMA_HISTOGRAM_ENUMERATION("PLT.Abandoned.NoProxy.http", |
795 abandoned_page ? 1 : 0, 2); | 795 abandoned_page ? 1 : 0, 2); |
796 } | 796 } |
797 } | 797 } |
798 | 798 |
| 799 static bool false_start_trial(base::FieldTrialList::Find("SSLFalseStart") && |
| 800 !base::FieldTrialList::Find("SSLFalseStart")->group_name().empty()); |
| 801 if (false_start_trial) { |
| 802 if (scheme_type == URLPattern::SCHEME_HTTPS) { |
| 803 switch (load_type) { |
| 804 case NavigationState::LINK_LOAD_NORMAL: |
| 805 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
| 806 "PLT.BeginToFinish_LinkLoadNormal", "SSLFalseStart"), |
| 807 begin_to_finish_all_loads); |
| 808 break; |
| 809 case NavigationState::NORMAL_LOAD: |
| 810 PLT_HISTOGRAM(base::FieldTrial::MakeName( |
| 811 "PLT.BeginToFinish_NormalLoad", "SSLFalseStart"), |
| 812 begin_to_finish_all_loads); |
| 813 break; |
| 814 default: |
| 815 break; |
| 816 } |
| 817 } |
| 818 } |
| 819 |
799 // Site isolation metrics. | 820 // Site isolation metrics. |
800 UMA_HISTOGRAM_COUNTS("SiteIsolation.PageLoadsWithCrossSiteFrameAccess", | 821 UMA_HISTOGRAM_COUNTS("SiteIsolation.PageLoadsWithCrossSiteFrameAccess", |
801 cross_origin_access_count_); | 822 cross_origin_access_count_); |
802 UMA_HISTOGRAM_COUNTS("SiteIsolation.PageLoadsWithSameSiteFrameAccess", | 823 UMA_HISTOGRAM_COUNTS("SiteIsolation.PageLoadsWithSameSiteFrameAccess", |
803 same_origin_access_count_); | 824 same_origin_access_count_); |
804 | 825 |
805 // Log the PLT to the info log. | 826 // Log the PLT to the info log. |
806 LogPageLoadTime(navigation_state, frame->dataSource()); | 827 LogPageLoadTime(navigation_state, frame->dataSource()); |
807 | 828 |
808 // Since there are currently no guarantees that renderer histograms will be | 829 // Since there are currently no guarantees that renderer histograms will be |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 | 861 |
841 DCHECK(state); | 862 DCHECK(state); |
842 DCHECK(ds); | 863 DCHECK(ds); |
843 GURL url(ds->request().url()); | 864 GURL url(ds->request().url()); |
844 Time start = state->start_load_time(); | 865 Time start = state->start_load_time(); |
845 Time finish = state->finish_load_time(); | 866 Time finish = state->finish_load_time(); |
846 // TODO(mbelshe): should we log more stats? | 867 // TODO(mbelshe): should we log more stats? |
847 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " | 868 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " |
848 << url.spec(); | 869 << url.spec(); |
849 } | 870 } |
OLD | NEW |