diff options
author | lzheng@chromium.org <lzheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 21:15:13 +0000 |
---|---|---|
committer | lzheng@chromium.org <lzheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 21:15:13 +0000 |
commit | 789d04a3d1721efa2f78389e4441d365bda7ddab (patch) | |
tree | 2ef54d031a7f1efb977cc2b1730c5668156bfc63 | |
parent | f4a57a33aaf2ac9d00ac8ffa014e3278fb528318 (diff) | |
download | chromium_src-789d04a3d1721efa2f78389e4441d365bda7ddab.zip chromium_src-789d04a3d1721efa2f78389e4441d365bda7ddab.tar.gz chromium_src-789d04a3d1721efa2f78389e4441d365bda7ddab.tar.bz2 |
Increase npn_spdy to 50%, npn_http 25%.
Disable alternate protocol for npn_http case so browser don't need to fallback to
http (extra overhead) in this case.
Keep default group at 25% so we could use it to compare performance against
alternate protocol with spdy case.
BUG=48967
TEST=none
Review URL: http://codereview.chromium.org/2904012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52537 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_main.cc | 24 | ||||
-rw-r--r-- | net/http/http_network_layer.cc | 4 |
2 files changed, 18 insertions, 10 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index db14513..0bae529 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -248,12 +248,12 @@ void BrowserMainParts::SocketTimeoutFieldTrial() { } // When --use-spdy not set, users will be in A/B test for spdy. -// group A (_npn_with_spdy): this means npn and spdy are enabled. In case server -// supports spdy, browser will use spdy. -// group B (_npn_with_http): this means npn is enabled but spdy won't be used. -// Http is still used for all requests. -// default group: no npn or spdy is involved. The "old" non-spdy -// chrome behavior. +// group A (npn_with_spdy): this means npn and spdy are enabled. In case server +// supports spdy, browser will use spdy. +// group B (npn_with_http): this means npn is enabled but spdy won't be used. +// Http is still used for all requests. +// default group: no npn or spdy is involved. The "old" non-spdy +// chrome behavior. void BrowserMainParts::SpdyFieldTrial() { bool is_spdy_trial = false; if (parsed_command_line().HasSwitch(switches::kUseSpdy)) { @@ -262,11 +262,17 @@ void BrowserMainParts::SpdyFieldTrial() { net::HttpNetworkLayer::EnableSpdy(spdy_mode); } else { const FieldTrial::Probability kSpdyDivisor = 1000; - // TODO(lzheng): Increase these values to enable more spdy tests. // To enable 100% npn_with_spdy, set npnhttp_probability = 0 and set // npnspdy_probability = FieldTrial::kAllRemainingProbability. - FieldTrial::Probability npnhttp_probability = 250; // 25% - FieldTrial::Probability npnspdy_probability = 250; // 25% + // To collect stats, make sure that FieldTrial are distributed among + // all the three groups: + // npn_with_spdy : 50%, npn_with_http : 25%, default (no npn, no spdy): 25%. + // a. npn_with_spdy and default: these are used to collect stats for + // alternate protocol with spdy vs. no alternate protocol case. + // b. npn_with_spdy and npn_with_http: these are used to collect stats for + // https vs. https over spdy case. + FieldTrial::Probability npnhttp_probability = 250; + FieldTrial::Probability npnspdy_probability = 500; #if defined(OS_WIN) // Enable the A/B test for SxS. SxS is only available on windows std::wstring channel; diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc index 09ba494..7df286f 100644 --- a/net/http/http_network_layer.cc +++ b/net/http/http_network_layer.cc @@ -171,7 +171,9 @@ void HttpNetworkLayer::EnableSpdy(const std::string& mode) { HttpNetworkTransaction::SetNextProtos(kNpnProtosFull); force_spdy_ = false; } else if (option == kEnableNpnHttpOnly) { - HttpNetworkTransaction::SetUseAlternateProtocols(use_alt_protocols); + // Avoid alternate protocol in this case. Otherwise, browser will try SSL + // and then fallback to http. This introduces extra load. + HttpNetworkTransaction::SetUseAlternateProtocols(false); HttpNetworkTransaction::SetNextProtos(kNpnProtosHttpOnly); force_spdy_ = false; } else if (option == kDisableAltProtocols) { |