Bug 1341259 - Run a Telemetry experiment to enable Intersection Observer API. r=felipe
authorTobias Schneider <tschneider@mozilla.com>
Thu, 23 Feb 2017 12:25:34 -0800
changeset 108 5ff9169cf01e
parent 107 41d6781de8db
child 109 068e2fb1e8e3
push id84
push userfelipc@gmail.com
push date2017-02-23 20:37 +0000
reviewersfelipe
bugs1341259
Bug 1341259 - Run a Telemetry experiment to enable Intersection Observer API. r=felipe
experiments/intersection-observer-nightly54/code/bootstrap.js
experiments/intersection-observer-nightly54/code/install.rdf
experiments/intersection-observer-nightly54/experiment.xpi
experiments/intersection-observer-nightly54/manifest.json
new file mode 100755
--- /dev/null
+++ b/experiments/intersection-observer-nightly54/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-nightly54@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-nightly54/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-nightly54@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.0a1</em:minVersion>
+        <em:maxVersion>54.0a1</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</em:description>
+    <em:aboutURL>https://bugzilla.mozilla.org/show_bug.cgi?id=1341259</em:aboutURL>
+  </Description>
+</RDF>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ab4ef316afd50701428078b83e854ea66db38d1b
GIT binary patch
literal 5425
zc${@uWl$W-vR+&l4-ht32oMMo2ohX^E*ji|2Y1)S0xY`_LXaQ<77Mx%+%?$Z1P=sv
zcbAv*s$QLUPTkv6^P{Kc>*=ZP>aPCOl`t?V0000k01nm#>mPB)5(5DMPZ9v&uTvFS
zEh$b#RXJ`)XFpp92Qw}=ceCHRzM=_tl$nFm-ILLQFKuvNtv|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8nCs+fPW73&i)p=;J^@=Jl#8zjKT0jCMO+WG?d>JP7@tzosjS%CP&R`Tp7D|A|L)
zw;~u)9#-OD;{;Ctl{ndl28Js&UXH(7Joe<7@I)!AadM5GsSNZhWAK(xu;cf=JAO0B
z{z?VLVZ^BtKVT%<9NO>bSRX3(1jv&ZnQGmb&$0uOvr6;*kSw>^xN&ubd3CcvQD-pi
z=86VTS3*Ol!1(VZ-~UN48sNWBet%h@!}#xA?l1WZycZ$`{729G|G@uL82<*!6aTYJ
v{@dw)=h5FzYmoittopZwf5+r+3ku}_F+%D}SlEAE!1}XZ|9N)he^LJfFZKmG
new file mode 100644
--- /dev/null
+++ b/experiments/intersection-observer-nightly54/manifest.json
@@ -0,0 +1,19 @@
+{
+  "publish"     : true,
+  "priority"    : 2,
+  "name"        : "Intersection Observer API",
+  "description" : "Measuring the impact of enabling the Intersection Observer API in Firefox.",
+  "info"        : "<p><a href=\"https://bugzilla.mozilla.org/show_bug.cgi?id=1341259\">Related bug</a></p>",
+  "manifest"    : {
+    "id"               : "intersection-observer-nightly54@experiments.mozilla.org",
+    "startTime"        : 1487808000,
+    "endTime"          : 1489017600,
+    "maxActiveSeconds" : 1209600,
+    "appName"          : ["Firefox"],
+    "channel"          : ["nightly"],
+    "minVersion"       : "54.0a1",
+    "maxVersion"       : "54.0a1",
+    "minVersion"       : "54.0a1",
+    "maxVersion"       : "54.0a1"
+  }
+}