summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 15:12:59 +0000
committerziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 15:12:59 +0000
commitd068f7a813b8369677b4422f00e56b6176601640 (patch)
tree3cbc5c95740b071936a6792fc23043b72df959b7 /chrome
parent196f286c045d4bf22364f00801c5a9e1d59e8a40 (diff)
downloadchromium_src-d068f7a813b8369677b4422f00e56b6176601640.zip
chromium_src-d068f7a813b8369677b4422f00e56b6176601640.tar.gz
chromium_src-d068f7a813b8369677b4422f00e56b6176601640.tar.bz2
Experiment for number of persistent connections to server
Currently Chrome, Firefox, and IE8 have the number of outgoing connections to each host(server) set at 6. Safari uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to run faster) uses 8. We would like to see how much of an effect this value has on browsing. Too large a value might cause us to run into SYN flood detection mechanisms. This experiment assigns a value of (4, 6, 8, 16) at random at program launch, and uses it throughout the run. r=jar Review URL: http://codereview.chromium.org/2685005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49057 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_main.cc35
-rwxr-xr-xchrome/renderer/render_view.cc40
2 files changed, 75 insertions, 0 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index bc78554..bd37e7d 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -714,6 +714,41 @@ int BrowserMain(const MainFunctionParams& parameters) {
// Initialize statistical testing infrastructure for entire browser.
FieldTrialList field_trial;
+ // This is an A/B test for the maximum number of persistent connections per
+ // host. Currently Chrome, Firefox, and IE8 have this value set at 6.
+ // Safari uses 4, and Fasterfox (a plugin for Firefox that supposedly
+ // configures it to run faster) uses 8. We would like to see how much of an
+ // effect this value has on browsing. Too large a value might cause us to
+ // run into SYN flood detection mechanisms.
+ const FieldTrial::Probability kConnDivisor = 100;
+ const FieldTrial::Probability kConn16 = 10; // 10% probability
+ const FieldTrial::Probability kRemainingConn = 30; // 30% probability
+
+ scoped_refptr<FieldTrial> conn_trial =
+ new FieldTrial("ConnCountImpact", kConnDivisor);
+
+ const int conn_16 = conn_trial->AppendGroup("_conn_count_16", kConn16);
+ const int conn_4 = conn_trial->AppendGroup("_conn_count_4", kRemainingConn);
+ const int conn_8 = conn_trial->AppendGroup("_conn_count_8", kRemainingConn);
+ const int conn_6 = conn_trial->AppendGroup("_conn_count_6",
+ FieldTrial::kAllRemainingProbability);
+
+ const int conn_trial_grp = conn_trial->group();
+
+ if (conn_trial_grp == conn_4) {
+ net::HttpNetworkSession::set_max_sockets_per_group(4);
+ } else if (conn_trial_grp == conn_6) {
+ // This (6) is the current default value.
+ net::HttpNetworkSession::set_max_sockets_per_group(6);
+ } else if (conn_trial_grp == conn_8) {
+ net::HttpNetworkSession::set_max_sockets_per_group(8);
+ } else if (conn_trial_grp == conn_16) {
+ net::HttpNetworkSession::set_max_sockets_per_group(16);
+ } else {
+ DCHECK(false);
+ }
+
+
// 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.
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 467d5c4..9ff9ccc 100755
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -4571,6 +4571,46 @@ void RenderView::DumpLoadHistograms() const {
}
}
+ static bool use_conn_impact_histogram(
+ FieldTrialList::Find("ConnCountImpact") &&
+ !FieldTrialList::Find("ConnCountImpact")->group_name().empty());
+ if (use_conn_impact_histogram) {
+ UMA_HISTOGRAM_ENUMERATION(
+ FieldTrial::MakeName("Renderer4.Abandoned", "ConnCountImpact"),
+ abandoned_page ? 1 : 0, 2);
+ UMA_HISTOGRAM_ENUMERATION(
+ FieldTrial::MakeName("Renderer4.LoadType", "ConnCountImpact"),
+ load_type, NavigationState::kLoadTypeMax);
+ switch (load_type) {
+ case NavigationState::NORMAL_LOAD:
+ UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName(
+ "Renderer4.BeginToFinish_NormalLoad", "ConnCountImpact"),
+ begin_to_finish, kBeginToFinishMin, kBeginToFinishMax,
+ kBeginToFinishBucketCount);
+ break;
+ case NavigationState::LINK_LOAD_NORMAL:
+ UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName(
+ "Renderer4.BeginToFinish_LinkLoadNormal", "ConnCountImpact"),
+ begin_to_finish, kBeginToFinishMin, kBeginToFinishMax,
+ kBeginToFinishBucketCount);
+ break;
+ case NavigationState::LINK_LOAD_RELOAD:
+ UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName(
+ "Renderer4.BeginToFinish_LinkLoadReload", "ConnCountImpact"),
+ begin_to_finish, kBeginToFinishMin, kBeginToFinishMax,
+ kBeginToFinishBucketCount);
+ break;
+ case NavigationState::LINK_LOAD_CACHE_STALE_OK:
+ UMA_HISTOGRAM_CUSTOM_TIMES(FieldTrial::MakeName(
+ "Renderer4.BeginToFinish_LinkLoadStaleOk", "ConnCountImpact"),
+ begin_to_finish, kBeginToFinishMin, kBeginToFinishMax,
+ kBeginToFinishBucketCount);
+ break;
+ default:
+ break;
+ }
+ }
+
static bool use_sdch_histogram(FieldTrialList::Find("GlobalSdch") &&
!FieldTrialList::Find("GlobalSdch")->group_name().empty());
if (use_sdch_histogram) {