Bug 1299605 - Run a Telemetry experiment to vet SKIA content on Windows. r=felipe
authorAnthony Hughes <anthony.s.hughes@gmail.com>
Tue, 20 Sep 2016 09:45:05 -0700
changeset 91 51653907b88be62cd9af7e892046169d4dc0752d
parent 90 3491bc57e173cfac936dd7edb3a76b7da2b8f775
child 92 b65f23017c421f1402dedc1602a7318bf0022fcf
push id68
push userfelipc@gmail.com
push dateTue, 20 Sep 2016 17:41:02 +0000
reviewersfelipe
bugs1299605
Bug 1299605 - Run a Telemetry experiment to vet SKIA content on Windows. r=felipe diff -r 3491bc57e173 -r 3eadc9a3a61d experiment.pyc Binary file experiment.pyc has changed
experiments/skia-windows-nightly/code/bootstrap.js
experiments/skia-windows-nightly/code/install.rdf
experiments/skia-windows-nightly/experiment.xpi
experiments/skia-windows-nightly/manifest.json
new file mode 100644
--- /dev/null
+++ b/experiments/skia-windows-nightly/code/bootstrap.js
@@ -0,0 +1,66 @@
+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 = "skia-windows-nightly@experiments.mozilla.org";
+const prefs = new Preferences();
+
+function startup() {
+  // 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 = "cairo";
+        prefs.set("gfx.content.azure.backends", "direct2d1.1,cairo");
+      }
+      yield Experiments.instance().setExperimentBranch(kSELF_ID, branch);
+    } else {
+      // Exclude the user if they've manually changed the pref
+      let pref = prefs.get("gfx.content.azure.backends");
+      let isBranchValid = true;
+      if (branch == "cairo") {
+        isBranchValid = (pref == "direct2d1.1,cairo");
+      } else if (branch == "control") {
+        isBranchValid = (pref == "direct2d1.1,skia");
+      }
+      if (!isBranchValid) {
+        branch = "user-changed";
+        yield Experiments.instance().setExperimentBranch(kSELF_ID, branch);
+      }
+    }
+  }).then(
+    function() {
+    },
+    function(e) {
+      Cu.reportError("Got error during bootstrap startup: " + e);
+    });
+}
+
+function shutdown(reason) {
+  if (reason != APP_SHUTDOWN) {
+    // when the add-on is being disabled/uninstalled
+    prefs.reset("gfx.content.azure.backends");
+  }
+}
+
+function install() {
+  // no-op
+}
+
+function uninstall() {
+  prefs.reset("gfx.content.azure.backends");
+}
new file mode 100644
--- /dev/null
+++ b/experiments/skia-windows-nightly/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>skia-windows-nightly@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>52.0a1</em:minVersion>
+        <em:maxVersion>52.0a1</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:name>SKIA Content on Windows</em:name>
+    <em:description>Measuring the effect of using SKIA as the default software rendering backend for content.</em:description>
+    <em:aboutURL>https://bugzilla.mozilla.org/show_bug.cgi?id=1299605</em:aboutURL>
+  </Description>
+</RDF>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8ce3f451b2bb6e8cb33fd8bb788a9f5ad1d48efa
GIT binary patch
literal 5532
zc$|$`1yCGFmmUUZa0nhW1b0XX?t@zhZi5BF4DRkaxCIOD65I)dBv`N@13`m(2G;<W
z-Kx92+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68UOCH5^qdHz7F
z;*sX07EMBPs%tNar)q9=&D(T8x-u$P{ltwQ?l=7no5&VC%*Oi&#fLqc%WrR?r~@ej
z(NUh-3VN%*rijpqKb+~<gAhldouTiqOPo7i&nsCpSNaBonv@pKGUWZj3b0^NZeqvS
zePUycUKTyO1s$Ht{d?J)xRUE{etX`(C&@oaaIQ9>G1YMuPBt#(89Ws(_OX%iMs40{
zfgdOCd^7Gtsv2C}-_F%WzN(_~SCgvxqrObW0p^UrT|r!GI4)Ch@NR8X7_2=+oCc3C
zja;|*Ek^s+bxBsXRWUi{O-Xt?DP?vxI1Byhf{QZ>KvM+;NQ(OJ`rv<C5DMU5)WSay
zXi@+Do&3Z8INTI0@*DR*cs2hw;6L4?e*xMP0RE#}_3uUgop^s02`Bz%8vY&O?>+nr
aA(Z4FJF2OIj`2qT`tM=;J1y;>dH)M*tqv~$
new file mode 100644
--- /dev/null
+++ b/experiments/skia-windows-nightly/manifest.json
@@ -0,0 +1,18 @@
+{
+  "publish"     : true,
+  "priority"    : 2,
+  "name"        : "SKIA Content on Windows",
+  "description" : "Measuring the effect of using SKIA as the default software rendering backend for content.",
+  "info"        : "<p><a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=1299605\">Related bug</a></p>",
+  "manifest"    : {
+    "id"               : "skia-windows-nightly@experiments.mozilla.org",
+    "startTime"        : 1474416000,
+    "endTime"          : 1475625600,
+    "maxActiveSeconds" : 1209600,
+    "appName"          : ["Firefox"],
+    "channel"          : ["nightly"],
+    "minVersion"       : "52.0a1",
+    "maxVersion"       : "52.0a1",
+    "os"               : ["WINNT"]
+  }
+}