QA/Telemetry/Developing a Telemetry Experiment: Difference between revisions
Jump to navigation
Jump to search
(better formatting) |
(more info) |
||
| Line 25: | Line 25: | ||
* If you grab one [http://hg.mozilla.org/webtools/telemetry-experiment-server/file/tip/experiments/e10s-beta45-withoutaddons/code/Makefile example Makefile] from the tree, you just need to use `make experiment` and the xpi will be created for you | * If you grab one [http://hg.mozilla.org/webtools/telemetry-experiment-server/file/tip/experiments/e10s-beta45-withoutaddons/code/Makefile 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) | ** note that the xpi is created under a build/ folder. You need to move it the proper location (the root of your experiment) | ||
== Building the server == | |||
* To test, you need to build the telemetry server (which is a simple static folder). To build it, you do in the root of the repo: | |||
** <code>python build.py ../build http://localhost:8080</code> | |||
* you can change ../build to any folder where you want to output it, **but note:**: this folder will be erased by the build.py script | |||
Revision as of 22:21, 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)
Building the server
- To test, you need to build the telemetry server (which is a simple static folder). To build it, you do in the root of the repo:
python build.py ../build http://localhost:8080
- you can change ../build to any folder where you want to output it, **but note:**: this folder will be erased by the build.py script