Bug 1367244 - Changes to release e10s multi on the Release channel. r=Felipe draft
authorBlake Kaplan <mrbkap@gmail.com>
Wed, 24 May 2017 14:43:47 -0700
changeset 584132 16ca7d109971f313445d8f8d924a020ea33f3a5c
parent 583335 96e18bec9fc8a5ce623c16167c12756bbe190d73
child 630292 865e59d540d59cef264fd736177a43c6bed59abd
push id60642
push userbmo:mrbkap@mozilla.com
push dateWed, 24 May 2017 23:24:31 +0000
reviewersFelipe
bugs1367244
milestone55.0a1
Bug 1367244 - Changes to release e10s multi on the Release channel. r=Felipe For Release, we are going for 0 extensions installed and an 80/20 (4 processes to 1 process) split. MozReview-Commit-ID: KGVXEWxpHx7
browser/extensions/e10srollout/bootstrap.js
--- a/browser/extensions/e10srollout/bootstrap.js
+++ b/browser/extensions/e10srollout/bootstrap.js
@@ -14,19 +14,22 @@ Cu.import("resource://gre/modules/AppCon
 // The amount of people to be part of e10s
 const TEST_THRESHOLD = {
   "beta": 0.9,  // 90%
   "release": 1.0,  // 100%
   "esr": 1.0,  // 100%
 };
 
 // If a user qualifies for the e10s-multi experiement, this is how many
-// content processes to use.
-const MULTI_BUCKETS = {
-  "beta": { 1: .5, 4: 1, },
+// content processes to use and whether to allow addons for the experiment.
+const MULTI_EXPERIMENT = {
+  "beta": { buckets: { 1: .5, 4: 1, }, // 1 process: 50%, 4 processes: 50%
+            addons: true },
+  "release": { buckets: { 1: .2, 4: 1 }, // 1 process: 20%, 4 processes: 80%
+               addons: false },
 };
 
 const ADDON_ROLLOUT_POLICY = {
   "beta": "50allmpc",
   "release": "50allmpc",
   "esr": "esrA", // WebExtensions and Addons with mpc=true
 };
 
@@ -155,24 +158,27 @@ function defineCohort() {
     eligibleForMulti = true;
   } else {
     setCohort(`${cohortPrefix}control`);
     Preferences.reset(PREF_TOGGLE_E10S);
     Preferences.reset(PREF_E10S_PROCESSCOUNT + ".web");
   }
 
   // Now determine if this user should be in the e10s-multi experiment.
-  // - We only run the experiment on channels defined in MULTI_BUCKETS.
+  // - We only run the experiment on channels defined in MULTI_EXPERIMENT.
+  // - If this experiment doesn't allow addons and we have a cohort prefix
+  //   (i.e. there's at least one addon installed) we stop here.
   // - We decided above whether this user qualifies for the experiment.
   // - If the user already opted into multi, then their prefs are already set
   //   correctly, we're done.
   // - If the user has addons that disqualify them for multi, leave them with
   //   the default number of content processes (1 on beta) but still in the
   //   test cohort.
-  if (!(updateChannel in MULTI_BUCKETS) ||
+  if (!(updateChannel in MULTI_EXPERIMENT) ||
+      (!MULTI_EXPERIMENT[updateChannel].addons && cohortPrefix) ||
       !eligibleForMulti ||
       userOptedIn.multi ||
       disqualified) {
     Preferences.reset(PREF_E10S_PROCESSCOUNT + ".web");
     return;
   }
 
   // If we got here with a cohortPrefix, it must be "addons-set50allmpc-",
@@ -180,17 +186,17 @@ function defineCohort() {
   // getAddonsDisqualifyForMulti returns false, that means that all installed
   // addons are webextension based, so note that in the cohort name.
   if (cohortPrefix && !getAddonsDisqualifyForMulti()) {
     cohortPrefix = "webextensions-";
   }
 
   // The user is in the multi experiment!
   // Decide how many content processes to use for this user.
-  let buckets = MULTI_BUCKETS[updateChannel];
+  let buckets = MULTI_EXPERIMENT[updateChannel].buckets;
 
   let multiUserSample = getUserSample(true);
   for (let sampleName of Object.getOwnPropertyNames(buckets)) {
     if (multiUserSample < buckets[sampleName]) {
       setCohort(`${cohortPrefix}multiBucket${sampleName}`);
       Preferences.set(PREF_E10S_PROCESSCOUNT + ".web", sampleName);
       break;
     }