Bug 1362418 - Run a Telemetry experiment to enable Intersection Observer API on Firefox Beta 54. r=felipe
authorTobias Schneider <schneider@jancona.com>
Tue, 09 May 2017 09:53:26 -0700
changeset 128 4086420fdadc
parent 127 f3ae7b4d2f48
child 129 752f9014009c
push id101
push userfelipc@gmail.com
push dateTue, 09 May 2017 19:45:32 +0000
reviewersfelipe
bugs1362418
Bug 1362418 - Run a Telemetry experiment to enable Intersection Observer API on Firefox Beta 54. r=felipe
experiments/intersection-observer-beta54/code/bootstrap.js
experiments/intersection-observer-beta54/code/install.rdf
experiments/intersection-observer-beta54/experiment.xpi
experiments/intersection-observer-beta54/manifest.json
new file mode 100755
--- /dev/null
+++ b/experiments/intersection-observer-beta54/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 = "intersection-observer-beta54@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 = "enabled";
+        prefs.set("dom.IntersectionObserver.enabled", true);
+      }
+      yield Experiments.instance().setExperimentBranch(kSELF_ID, branch);
+    } else {
+      // Exclude the user if they've manually changed the pref
+      let pref = prefs.get("dom.IntersectionObserver.enabled");
+      let isBranchValid = true;
+      if (branch == "enabled") {
+        isBranchValid = (pref == true);
+      } else if (branch == "control") {
+        isBranchValid = (pref == false);
+      }
+      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(reason) {
+  if (reason == ADDON_DISABLE || reason == ADDON_UNINSTALL) {
+    // when the add-on is being disabled/uninstalled
+    prefs.reset("dom.IntersectionObserver.enabled");
+  }
+}
+
+function install() {
+  // no-op
+}
+
+function uninstall() {
+  prefs.reset("dom.IntersectionObserver.enabled");
+}
new file mode 100755
--- /dev/null
+++ b/experiments/intersection-observer-beta54/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>intersection-observer-beta54@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>{c8cb8c64-f556-11e6-bc64-92361f002671}</em:id>
+        <em:minVersion>54.0b6</em:minVersion>
+        <em:maxVersion>54.0b13</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <!-- Front End MetaData -->
+    <em:name>Intersection Observer API</em:name>
+    <em:description>Measures the impact of enabling the Intersection Observer API in Firefox Beta 54</em:description>
+    <em:aboutURL>https://bugzilla.mozilla.org/show_bug.cgi?id=1362418</em:aboutURL>
+  </Description>
+</RDF>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f3d3c4a947d6734f4b95bbded9d4bede60e57afc
GIT binary patch
literal 5518
zc$|$`bx<5gvtKk2NLbv06WoF?P69!8A;{uRu!Tj!vRHyUK>`7Sy9akCK|`<r!Ce=3
zx4hg{y?5`sx~uwnYX0b{ncqxLch6M+)W8^+Bme*a2e2hor2L%%Du?$70B{BZ0Dp|C
z$U|khl~iBy+B<r};BYe@XN1|j4oo!8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usvI$(PT!+Ty7QLa~@FxwK2Cl^i~$
zs4W#q&#s$I)}eSPx>3aQ`@!K=S%(a2;b?G+a=3h<5SFdC2kR(H=(sz4GWzSdYhZ&7
zMR~oMki!-0f7(pqv9@gcTl4tciT{aoLs;PrL59Ix?A*%ZkHFj<Lj%Lr8hk$mmX49n
z#*uxHSKK@!XDS2z5DfkjlH*iH=hIe%SM2FW$(+&o`4<Bm{sH~=_Kp6MPaZvszqt`l
zS)(j?8%$E*Dc6+ul7u`FtKiZix0!@_*7*$@Kn;wBPJ;38jNt!@FB;%q_`yFAXfgi%
zTl_=*SiI*a`5X7Y`6T~8;y*nke<2$EKIMP$to+@`zen9)M*0!`a}53+;qN~D3js;|
Xj~-P6V`2X>0qb|O`MoXh&wc*~eh?Q?
new file mode 100644
--- /dev/null
+++ b/experiments/intersection-observer-beta54/manifest.json
@@ -0,0 +1,17 @@
+{
+  "publish"     : true,
+  "priority"    : 2,
+  "name"        : "Intersection Observer API",
+  "description" : "Measuring the impact of enabling the Intersection Observer API in Firefox Beta 54.",
+  "info"        : "<p><a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=1362418\">Related bug</a></p>",
+  "manifest"    : {
+    "id"               : "intersection-observer-beta54@experiments.mozilla.org",
+    "startTime"        : 1494201600,
+    "endTime"          : 1496620800,
+    "maxActiveSeconds" : 2419200,
+    "appName"          : ["Firefox"],
+    "channel"          : ["beta"],
+    "minVersion"       : "54.0b6",
+    "sample"           : 0.4
+  }
+}