1- # Glean.js size benchmarks
1+ # Glean.js benchmarks
22
3- Compare the size of the different Glean bundles across the local ` main ` branch and the current checkout.
3+ ## Size
44
5- ## How to run
5+ The size project contains benchmarking scripts
6+ for analyzing the size of the Glean.js library.
7+
8+ ### Report
9+
10+ Compare the size of the different Glean bundles across the local ` main `
11+ branch and the current checkout.
612
713To run a local report:
814
@@ -16,4 +22,45 @@ To run the report and post the results to a GitHub pull request:
1622npm run size:report
1723```
1824
19- _ Note: This requires a ` GITHUB_TOKEN ` and the CircleCI environment to know which PR to post to._
25+ > ** Note** : This script requires the ` GITHUB_TOKEN ` environment variable
26+ > and the CircleCI environment to know which PR to post to.
27+ > It is not really meant to be run outside of CircleCI.
28+
29+ ### Docs
30+
31+ Builds the Glean.js library for all the targeted platforms and document
32+ the size of the library and of each extra metrics and plugins.
33+
34+ To run the script without updating the documentation:
35+
36+ ```
37+ npm run size:docs:dry
38+ ```
39+
40+ To run the script and update the documentation.
41+
42+ ```
43+ npm run size:docs
44+ ```
45+
46+ ## Browser compatibility
47+
48+ The compat project contains benchmarking scripts
49+ for smoke testing Glean.js in various supported browsers.
50+
51+ To run the test locally in Firefox only:
52+
53+ ```
54+ npm run compat:test
55+ ```
56+
57+ To run the test in BrowserStack in a list of different browsers,
58+ both in the minimum known supported version of the browser
59+ and in the latest version of the browser:
60+
61+ ```
62+ npm run compat:test:browserstack
63+ ```
64+
65+ > ** Note** : This script expects the ` BROWSERSTACK_USER_NAME ` and
66+ > ` BROWSERSTACK_ACCESS_KEY ` environment variables to be set.
0 commit comments