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

Unified Diff: chrome/renderer/render_view.cc

Issue 2808010: Add field trial stats for alternate_protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/navigation_state.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 50874)
+++ chrome/renderer/render_view.cc (working copy)
@@ -3005,6 +3005,8 @@
// Record page load flags.
navigation_state->set_was_fetched_via_spdy(response.wasFetchedViaSPDY());
navigation_state->set_was_npn_negotiated(response.wasNpnNegotiated());
+ navigation_state->set_was_alternate_protocol_available(
+ response.wasAlternateProtocolAvailable());
navigation_state->set_was_fetched_via_proxy(response.wasFetchedViaProxy());
// Consider loading an alternate error page for 404 responses.
@@ -4715,7 +4717,12 @@
// and StartToFinish, consider removing one or the other.
static bool use_spdy_histogram(FieldTrialList::Find("SpdyImpact") &&
!FieldTrialList::Find("SpdyImpact")->group_name().empty());
- if (use_spdy_histogram && navigation_state->was_npn_negotiated()) {
+ // Spdy requests triggered by alternate protocol are excluded here.
+ // This is because when alternate protocol is avaiable, FieldTrial will
+ // 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(
FieldTrial::MakeName("PLT.Abandoned", "SpdyImpact"),
abandoned_page ? 1 : 0, 2);
@@ -4747,6 +4754,56 @@
}
}
+ // Histograms to compare the impact of alternate protocol: when the
+ // protocol(spdy) is used vs. when it is ignored and http is used.
+ if (navigation_state->was_alternate_protocol_available()) {
+ if (!navigation_state->was_npn_negotiated()) {
+ // This means that even there is alternate protocols for npn_http or
+ // npn_spdy, they are not taken (due to the fieldtrial).
+ switch (load_type) {
+ case NavigationState::LINK_LOAD_NORMAL:
+ PLT_HISTOGRAM(
+ "PLT.StartToFinish_LinkLoadNormal_AlternateProtocol_http",
+ start_to_finish);
+ PLT_HISTOGRAM(
+ "PLT.StartToCommit_LinkLoadNormal_AlternateProtocol_http",
+ start_to_commit);
+ break;
+ case NavigationState::NORMAL_LOAD:
+ PLT_HISTOGRAM(
+ "PLT.StartToFinish_NormalLoad_AlternateProtocol_http",
+ start_to_finish);
+ PLT_HISTOGRAM(
+ "PLT.StartToCommit_NormalLoad_AlternateProtocol_http",
+ start_to_commit);
+ break;
+ default:
+ break;
+ }
+ } else if (navigation_state->was_fetched_via_spdy()) {
+ switch (load_type) {
+ case NavigationState::LINK_LOAD_NORMAL:
+ PLT_HISTOGRAM(
+ "PLT.StartToFinish_LinkLoadNormal_AlternateProtocol_spdy",
+ start_to_finish);
+ PLT_HISTOGRAM(
+ "PLT.StartToCommit_LinkLoadNormal_AlternateProtocol_spdy",
+ start_to_commit);
+ break;
+ case NavigationState::NORMAL_LOAD:
+ PLT_HISTOGRAM(
+ "PLT.StartToFinish_NormalLoad_AlternateProtocol_spdy",
+ start_to_finish);
+ PLT_HISTOGRAM(
+ "PLT.StartToCommit_NormalLoad_AlternateProtocol_spdy",
+ start_to_commit);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
// Record page load time and abandonment rates for proxy cases.
GURL url = GURL(main_frame->url());
if (navigation_state->was_fetched_via_proxy()) {
« no previous file with comments | « chrome/renderer/navigation_state.h ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698