Updated Benchmarking your changes (markdown)

Tim van der Meij 2020-06-02 23:54:30 +02:00
parent dee2bc1021
commit 336073a2ad

@ -16,24 +16,22 @@ When working on issues related to performance, it is important to provide a perf
Run the following commands to create a 'baseline' measurement (i.e., before you make your changes):
$ git checkout master
$ SKIP_BABEL=true gulp generic
$ gulp generic
$ cd test
$ node test.js --browserManifestFile=resources/browser_manifests/browser_manifest.json \
--statsFile=stats/results/baseline.json --statsDelay=5000 \
--manifestFile=benchmark.json
$ node test.js --statsFile=stats/results/baseline.json --statsDelay=5000 --manifestFile=benchmark.json
Then apply your changes and create a 'current' measurement (replace `<feature-branch>` with the name of your branch):
$ cd ..
$ git checkout <feature-branch>
$ SKIP_BABEL=true gulp generic
$ gulp generic
$ cd test
$ node test.js --browserManifestFile=resources/browser_manifests/browser_manifest.json \
--statsFile=stats/results/current.json --statsDelay=5000 \
--manifestFile=benchmark.json
$ node test.js --statsFile=stats/results/current.json --statsDelay=5000 --manifestFile=benchmark.json
Finally, you can compare the measurements and see any performance differences:
$ node stats/statcmp.js stats/results/baseline.json stats/results/current.json
As a sanity check, you should do this twice with the same code and compare the results.
As a sanity check, you should do this twice with the same code and compare the results.
For faster benchmarking during development, it could be useful to pass the `--noChrome` command line parameter to `test.js` to skip Chrome and only test with Firefox.