Bug 1367246 - Run a Telemetry experiment to vet the unaccelerated compositor process in Nightly 56 r=felipe
authorAnthony Hughes <anthony.s.hughes@gmail.com>
Mon, 10 Jul 2017 12:11:22 -0300
changeset 130 61df6e6c03cf
parent 129 752f9014009c
child 131 a8a91936dac3
push id102
push userfelipc@gmail.com
push dateMon, 10 Jul 2017 15:11:55 +0000
reviewersfelipe
bugs1367246
Bug 1367246 - Run a Telemetry experiment to vet the unaccelerated compositor process in Nightly 56 r=felipe
experiments/unaccelerated-compositor-process-nightly56/code/bootstrap.js
experiments/unaccelerated-compositor-process-nightly56/code/install.rdf
experiments/unaccelerated-compositor-process-nightly56/experiment.xpi
experiments/unaccelerated-compositor-process-nightly56/manifest.json
new file mode 100644
--- /dev/null
+++ b/experiments/unaccelerated-compositor-process-nightly56/code/bootstrap.js
@@ -0,0 +1,103 @@
+let {classes: Cc, interfaces: Ci, utils: Cu} = Components;
+
+Cu.import("resource:///modules/experiments/Experiments.jsm");
+Cu.import("resource://gre/modules/Task.jsm");
+Cu.import("resource://gre/modules/Preferences.jsm");
+
+var gStarted = false;
+
+const kSELF_ID = "unaccelerated-compositor-process-nightly56@experiments.mozilla.org";
+const prefs = new Preferences();
+
+function startup() {
+  let branch = Experiments.instance().getExperimentBranch(kSELF_ID);
+  if (branch == null) {
+    checkForCompositor();
+  } else {
+    return;
+  }
+}
+
+function initializeExperiment() {
+  // Seems startup() function is launched twice after install, we're
+  // unsure why so far. We only want it to run once.
+  if (gStarted) {
+    return;
+  }
+  gStarted = true;
+
+  Task.spawn(function*() {
+    let branch = yield Experiments.instance().getExperimentBranch(kSELF_ID);
+    if (branch == null) {
+      let r = Math.random() * 2;
+      if (r < 1) {
+        branch = "control";
+      } else {
+        branch = "disabled";
+        prefs.set("layers.gpu-process.allow-software", false);
+      }
+      yield Experiments.instance().setExperimentBranch(kSELF_ID, branch);
+    } else {
+      // Exclude the user if they've manually changed the pref
+      let pref = prefs.get("layers.gpu-process.allow-software");
+      let isBranchValid = true;
+      if (branch == "disabled") {
+        isBranchValid = (pref == false);
+      } else if (branch == "control") {
+        isBranchValid = (pref == true);
+      } else if (branch == "disqualified") {
+        isBranchValid = (pref == true);
+      }
+      if (!isBranchValid) {
+        branch = "usermod";
+        yield Experiments.instance().setExperimentBranch(kSELF_ID, branch);
+      }
+    }
+  }).then(
+    function() {
+    },
+    function(e) {
+      Cu.reportError("Got error during bootstrap startup: " + e);
+    });
+}
+
+function shutdown(data, reason) {
+  if (reason == ADDON_DISABLE || reason == ADDON_UNINSTALL) {
+    // when the add-on is being disabled/uninstalled
+    prefs.reset("layers.gpu-process.allow-software");
+  }
+}
+
+function install() {
+  checkForCompositor();
+}
+
+function uninstall() {
+  prefs.reset("layers.gpu-process.allow-software");
+}
+
+function checkForCompositor() {
+  let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
+  let gfxFeatures = gfxInfo.getFeatures();
+  let compositor = gfxFeatures.hasOwnProperty("compositor")
+                   ? gfxFeatures.compositor
+                   : "none";
+  if (compositor != "none") {
+    if (compositor == "basic") {
+      initializeExperiment();
+    } else {
+      Experiments.instance().setExperimentBranch(kSELF_ID, "disqualified").then(null, Cu.reportError);
+    }
+  } else {
+    let listener = function (subject, topic) {
+      let gfxFeatures = gfxInfo.getFeatures();
+      if (gfxFeatures.compositor == "basic") {
+        initializeExperiment();
+      } else {
+        Experiments.instance().setExperimentBranch(kSELF_ID, "disqualified").then(null, Cu.reportError);
+      }
+      Services.obs.removeObserver(listener, "compositor:created");
+    };
+    Services.obs.addObserver(listener, "compositor:created", false);
+  }
+}
new file mode 100644
--- /dev/null
+++ b/experiments/unaccelerated-compositor-process-nightly56/code/install.rdf
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>unaccelerated-compositor-process-nightly56@experiments.mozilla.org</em:id>
+    <em:version>1.0.0</em:version>
+    <em:type>128</em:type>
+    <em:bootstrap>true</em:bootstrap>
+    <em:unpack>false</em:unpack>
+
+    <!-- Firefox -->
+    <em:targetApplication>
+      <Description>
+        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+        <em:minVersion>56.0a1</em:minVersion>
+        <em:maxVersion>56.0a1</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:name>Unaccelerated Compositor Process Nightly 56</em:name>
+    <em:description>Measures the impact of enabling compositor process for users without hardware acceleration in Firefox Nightly 56 on Windows</em:description>
+    <em:aboutURL>https://bugzilla.mozilla.org/show_bug.cgi?id=1356091</em:aboutURL>
+  </Description>
+</RDF>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..61485fc5214f66872071291a952a4768be4eeda1
GIT binary patch
literal 5943
zc$}43RZtwtwjCe@cL*9JL4s>=*Py{Yz%aPG4KhF`g9U<nAh^4`1eXB@cMonslK?NN
zcVC@*Po4Ymc2`%|>grlmyL(mb-Ai2=<q0tW06+(1d+aJr<Ro!0;s5}F_yEA4T~#@4
zDRxCQc}_=XKU)U}Acvbfa7E8oG~p+OKxB1g=#cm|S+58gXibqynGZ?`ieea<S6q-+
zjf`hta61}OOHyCxp&d#BF~vIM%f1@UKM~3VpU~V?{%p>I-=E%hz;Aq4zukbdzWwy4
zhV+o*g5q-1G#lq7vDY0i3rQt6JkUZV$(}(l<YUZX5Y)YWKvEXHIzQACHG6^+nfOf*
z{}XKFP#~?s12B!E>zWDcYt1RK%unhkA+Vlxvo>~lbbLX;s7n*7&@y5v9l}SCb{mU=
zF7?^MH0lLJysD-v|FP=8NT048Ww4_AD+=<|EMjF2G56e7858}SK8}k_^1KTPS>ou1
z3FG-~=zB&&V)Tj%i#18qESgE;L8KEh63KlyajK-hX0U`bYR*t#a1qTfng_oiAA%uq
z2zm%kD2fZDgizi9C)8E4ikbOX=177LKOP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c
zZ&1^*AEs?Psf4#UOAHBnU5o~u{xDOYABSxg+sUK-t(>sHrVb6mYs2ZI!x`1q&1pA%
zLgS|iW#f;GJ{rP#GRRtMXq6X6?4fouG`%*@T$<rkf@gb04Se!-7ZSqGM!6r&Gj$F+
z?|5U-p#0t0arJ`@;N8(m(Z?Oj_@#3UA#cN`nYiW@6<DB!bKD2fJGB4Icuy(D)aEzx
z{XL2P$p>|}!WvhBE3+}PE6w02v$Kqk!fQ3Trg_&dJh^8)hg9COb4*^Tj*h6H@IVO1
z6Y1!Z8036~h7_MR>rfLoNs&nHH#8V`Q%8SD8J5X4W?yb&|K*-Rq!sl-8YibNSB1@3
zwR9M}*0H$>pstLBOpNm1E!zJJ2om7G7`A^HBvAf)GxEPd3&{)C|IPdVY)$^1{GSTa
zU*y$zfd6-S`g`(!SK?pEKO_EUUH+Zn?=Slo13Jk+zO%YA>eD|5P=Aj<cl?Fq5BeWc
CB?*ZD
new file mode 100644
--- /dev/null
+++ b/experiments/unaccelerated-compositor-process-nightly56/manifest.json
@@ -0,0 +1,19 @@
+{
+  "publish"     : true,
+  "priority"    : 2,
+  "name"        : "Unaccelerated Compositor Process Nightly 56",
+  "description" : "Measures the impact of enabling compositor process for users without hardware acceleration in Firefox Nightly 56 on Windows",
+  "info"        : "<p><a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=1356091\">Related bug</a></p>",
+  "manifest"    : {
+    "id"               : "unaccelerated-compositor-process-nightly56@experiments.mozilla.org",
+    "startTime"        : 1499644800,
+    "endTime"          : 1500508800,
+    "maxActiveSeconds" : 864000,
+    "appName"          : ["Firefox"],
+    "channel"          : ["nightly"],
+    "minVersion"       : "56.0a1",
+    "maxVersion"       : "56.0a1",
+    "os"               : ["WINNT"],
+    "sample"           : 0.25
+  }
+}