diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 16:31:54 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 16:31:54 +0000 |
commit | e695fbd6d62e9967d6256cd0667eca2fb2bb918d (patch) | |
tree | 58e196031e02447b31bd9a4182b8fb3f4d7ea81b /chrome/browser/net | |
parent | 5c7c19d83d201fa23d5097cce108c033ece5c63b (diff) | |
download | chromium_src-e695fbd6d62e9967d6256cd0667eca2fb2bb918d.zip chromium_src-e695fbd6d62e9967d6256cd0667eca2fb2bb918d.tar.gz chromium_src-e695fbd6d62e9967d6256cd0667eca2fb2bb918d.tar.bz2 |
Create A/B test of SDCH
To do this, I needed to add the feature that ALL FieldTrials that are
established in the browser process are forwarded and established in
the corresponding renderer processes. This then allows both DNS impact,
as well as SDCH inmpact (and any other field tests) to be studied
at the same time in a single binary.
This checkin also establishes a pattern that when we're doing A/B tests
via a histogram such as RequestToFinish, that we produce names for
all groups, rather than leaving one group as the "default" or "empty postfix"
group. This is critical for naming various sub-groups when a multitude
of tests are taking place at the same time.
BUG=15479
r=mbelshe
Review URL: http://codereview.chromium.org/150087
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19595 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r-- | chrome/browser/net/dns_global.cc | 7 | ||||
-rw-r--r-- | chrome/browser/net/dns_master.h | 3 | ||||
-rw-r--r-- | chrome/browser/net/dns_master_unittest.cc | 6 |
3 files changed, 11 insertions, 5 deletions
diff --git a/chrome/browser/net/dns_global.cc b/chrome/browser/net/dns_global.cc index 68cfad3..d18ea45 100644 --- a/chrome/browser/net/dns_global.cc +++ b/chrome/browser/net/dns_global.cc @@ -581,12 +581,15 @@ DnsPrefetcherInit::DnsPrefetcherInit(PrefService* user_prefs, int parallel_4_prefetch = trial_->AppendGroup("_parallel_4_prefetch", kProbabilityPerGroup); // Set congestion detection at 500ms, rather than the 1 second default. - int max_500ms_prefetch = trial_->AppendGroup("_max_500ms_prefetch_queue", + int max_500ms_prefetch = trial_->AppendGroup("_max_500ms_queue_prefetch", kProbabilityPerGroup); // Set congestion detection at 2 seconds instead of the 1 second default. - int max_2s_prefetch = trial_->AppendGroup("_max_2s_prefetch_queue", + int max_2s_prefetch = trial_->AppendGroup("_max_2s_queue_prefetch", kProbabilityPerGroup); + trial_->AppendGroup("_default_enabled_prefetch", + FieldTrial::kAllRemainingProbability); + if (trial_->group() != disabled_prefetch) { // Initialize the DNS prefetch system. diff --git a/chrome/browser/net/dns_master.h b/chrome/browser/net/dns_master.h index b4af6f4..608dba8 100644 --- a/chrome/browser/net/dns_master.h +++ b/chrome/browser/net/dns_master.h @@ -99,6 +99,9 @@ class DnsMaster : public base::RefCountedThreadSafe<DnsMaster> { // values into the current referrer list. void DeserializeReferrers(const ListValue& referral_list); + // For unit test code only. + size_t max_concurrent_lookups() const { return max_concurrent_lookups_; } + private: FRIEND_TEST(DnsMasterTest, BenefitLookupTest); FRIEND_TEST(DnsMasterTest, ShutdownWhenResolutionIsPendingTest); diff --git a/chrome/browser/net/dns_master_unittest.cc b/chrome/browser/net/dns_master_unittest.cc index 921b43b..c2b3d27 100644 --- a/chrome/browser/net/dns_master_unittest.cc +++ b/chrome/browser/net/dns_master_unittest.cc @@ -285,7 +285,7 @@ TEST_F(DnsMasterTest, SingleLookupTest) { EXPECT_GT(testing_master->peak_pending_lookups(), names.size() / 2); EXPECT_LE(testing_master->peak_pending_lookups(), names.size()); EXPECT_LE(testing_master->peak_pending_lookups(), - DnsPrefetcherInit::kMaxConcurrentLookups); + testing_master->max_concurrent_lookups()); testing_master->Shutdown(); } @@ -340,7 +340,7 @@ TEST_F(DnsMasterTest, ConcurrentLookupTest) { EXPECT_GT(testing_master->peak_pending_lookups(), names.size() / 2); EXPECT_LE(testing_master->peak_pending_lookups(), names.size()); EXPECT_LE(testing_master->peak_pending_lookups(), - DnsPrefetcherInit::kMaxConcurrentLookups); + testing_master->max_concurrent_lookups()); testing_master->Shutdown(); } @@ -366,7 +366,7 @@ TEST_F(DnsMasterTest, DISABLED_MassiveConcurrentLookupTest) { EXPECT_LE(testing_master->peak_pending_lookups(), names.size()); EXPECT_LE(testing_master->peak_pending_lookups(), - DnsPrefetcherInit::kMaxConcurrentLookups); + testing_master->max_concurrent_lookups()); testing_master->Shutdown(); } |