The following instructions are for unix-based systems.
The code to generate the data is in the main branch, located in src/recomp-metrics.
The data is in the gh-pages branch, located in data/RC/snapshot.json and data/RC/progress.json.
To update the data,
both the main and gh-pages branches of this repository need to be available as separate directories.
The easiest way to achieve that is to add the gh-pages branch as a separate worktree
under your clone of this repo:
git worktree add gh-pages origin/gh-pages
You will also need a git checkout of the mozilla-firefox/firefox repository:
git clone [email protected]:mozilla-firefox/firefox.git mozilla-unified
Following these steps results in the following directory tree, but this is not required as the directory names and paths are arbitrary.
.
├── recomp-metrics // a checkout of the main branch
| └── gh-pages // a checkout of the gh-pages branch
└── mozilla-unified // a mercurial checkout of mozilla-unified
Aggregating data for RC can be done by statically analyzing the repository.
python3 src/recomp-metrics/aggregate.py -m RC --mc ../mozilla-unified --gh-pages-data gh-pages/data --use-current-revision
Once you've generated new data for RC, you may want to serve the static site locally to view the update yourself. For example, you can run python3 -m http.server 8000 from the folder with the gh-pages clone.
Ultimately, you will need to add the changes as a commit on the gh-pages branch and push them to the repository.
modified: data/RC/progress.json
modified: data/RC/snapshot.json
We often make changes to the main and gh-pages branches simultaneously. To get all the pieces working together locally, follow these steps:
- From the
mainbranch checkout whatever feature branch you are working on or reviewing - Run the command to generate data
cdintogh-pages- Switch to the
gh-pagesbranch you are working on or reviewing - Run
python3 -m http.server 8000to start a local server