Commit 115f5540 authored by lzheng@google.com's avatar lzheng@google.com

Make sure we check http/https to collect stats for spdy or apa.

SpdyTrial_npn_http/npn_spdy: compare them for https traffic.
xxx_AlternateProtocol_spdy/http: compare them for http traffic.

BUG=46689
TEST=none
Review URL: http://codereview.chromium.org/3023022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53916 0039d316-1c4b-4281-b951-d872f2087c98
parent 6bef6250
...@@ -4737,17 +4737,16 @@ void RenderView::DumpLoadHistograms() const { ...@@ -4737,17 +4737,16 @@ void RenderView::DumpLoadHistograms() const {
"PLT.BeginToFinishDoc_LinkLoad", "CacheSize"), begin_to_finish_doc); "PLT.BeginToFinishDoc_LinkLoad", "CacheSize"), begin_to_finish_doc);
} }
// Histograms to determine if SPDY has an impact.
GURL url = GURL(main_frame->url());
// Histograms to determine if SPDY has an impact for https traffic.
// TODO(mbelshe): After we've seen the difference between BeginToFinish // TODO(mbelshe): After we've seen the difference between BeginToFinish
// and StartToFinish, consider removing one or the other. // and StartToFinish, consider removing one or the other.
static bool use_spdy_histogram(FieldTrialList::Find("SpdyImpact") && static bool use_spdy_histogram(FieldTrialList::Find("SpdyImpact") &&
!FieldTrialList::Find("SpdyImpact")->group_name().empty()); !FieldTrialList::Find("SpdyImpact")->group_name().empty());
// Spdy requests triggered by alternate protocol are excluded here. if (use_spdy_histogram && url.SchemeIs("https") &&
// This is because when alternate protocol is avaiable, FieldTrial will navigation_state->was_npn_negotiated()) {
// either use npn_spdy or pure http, not npn_http via TLS. That will cause
// bias for npn_spdy and npn_http.
if (use_spdy_histogram && navigation_state->was_npn_negotiated() &&
!navigation_state->was_alternate_protocol_available()) {
UMA_HISTOGRAM_ENUMERATION( UMA_HISTOGRAM_ENUMERATION(
FieldTrial::MakeName("PLT.Abandoned", "SpdyImpact"), FieldTrial::MakeName("PLT.Abandoned", "SpdyImpact"),
abandoned_page ? 1 : 0, 2); abandoned_page ? 1 : 0, 2);
...@@ -4779,9 +4778,10 @@ void RenderView::DumpLoadHistograms() const { ...@@ -4779,9 +4778,10 @@ void RenderView::DumpLoadHistograms() const {
} }
} }
// Histograms to compare the impact of alternate protocol: when the // Histograms to compare the impact of alternate protocol over http traffic:
// protocol(spdy) is used vs. when it is ignored and http is used. // when spdy is used vs. when http is used.
if (navigation_state->was_alternate_protocol_available()) { if (url.SchemeIs("http") &&
navigation_state->was_alternate_protocol_available()) {
if (!navigation_state->was_npn_negotiated()) { if (!navigation_state->was_npn_negotiated()) {
// This means that even there is alternate protocols for npn_http or // This means that even there is alternate protocols for npn_http or
// npn_spdy, they are not taken (due to the fieldtrial). // npn_spdy, they are not taken (due to the fieldtrial).
...@@ -4830,7 +4830,6 @@ void RenderView::DumpLoadHistograms() const { ...@@ -4830,7 +4830,6 @@ void RenderView::DumpLoadHistograms() const {
} }
// Record page load time and abandonment rates for proxy cases. // Record page load time and abandonment rates for proxy cases.
GURL url = GURL(main_frame->url());
if (navigation_state->was_fetched_via_proxy()) { if (navigation_state->was_fetched_via_proxy()) {
if (url.SchemeIs("https")) { if (url.SchemeIs("https")) {
PLT_HISTOGRAM("PLT.StartToFinish.Proxy.https", start_to_finish); PLT_HISTOGRAM("PLT.StartToFinish.Proxy.https", start_to_finish);
...@@ -5209,4 +5208,3 @@ bool RenderView::IsNonLocalTopLevelNavigation( ...@@ -5209,4 +5208,3 @@ bool RenderView::IsNonLocalTopLevelNavigation(
} }
return false; return false;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment