QA/Telemetry/Developing a Telemetry Experiment: Difference between revisions
Jump to navigation
Jump to search
(Creating this page) |
(better formatting) |
||
| Line 6: | Line 6: | ||
* create a new folder under experiments/ for your new experiment | * create a new folder under experiments/ for your new experiment | ||
** it is highly recommended that you use `hg cp` from an existing folder (this makes review easier as it's able to track the changes made to the boilerplate files) | ** it is highly recommended that you use `hg cp` from an existing folder (this makes review easier as it's able to track the changes made to the boilerplate files) | ||
** e.g. | ** e.g. | ||
** use a descriptive folder name to | *** <code>cd experiments; hg cp e10s-beta45-withoutaddons my-new-experiment</code> | ||
* the main experiment code | ** use a descriptive folder name to highlight the feature, channel and version | ||
* the main experiment code lives in code/bootstrap.js | |||
== Manifest file == | == Manifest file == | ||
Revision as of 22:04, 25 February 2016
Telemetry Experiments
Getting started
- clone the repo http://hg.mozilla.org/webtools/telemetry-experiment-server/
- create a new folder under experiments/ for your new experiment
- it is highly recommended that you use `hg cp` from an existing folder (this makes review easier as it's able to track the changes made to the boilerplate files)
- e.g.
cd experiments; hg cp e10s-beta45-withoutaddons my-new-experiment
- use a descriptive folder name to highlight the feature, channel and version
- the main experiment code lives in code/bootstrap.js
Manifest file
- the file under experiments/your-experiment/manifest.json contains the configuration details for your experiment
- the "sample" value, for example, tells the percentage of users (matching the other criteria) that will receive your experiment
install.rdf file
- the file under experiments/your-experiment/code/install.rdf file contains details about the experiment add-on. The <type> value for all experiments should be 128. Note that an add-on with type=128 does not work by drag'n'dropping it to Firefox like a regular add-on (it needs to be loaded by the experiment system)
Building the experiment
- To build the experiment, you just need to create an .xpi file with your bootstrap.js and install.rdf files. Put this xpi in the root of your experiment folder (i.e., experiments/your-experiment/)
- If you grab one example Makefile from the tree, you just need to use `make experiment` and the xpi will be created for you
- note that the xpi is created under a build/ folder. You need to move it the proper location (the root of your experiment)