Skip to content

Commit 2e93ef1

Browse files
committed
Merge branch 'main' into bug_1716956_new
2 parents c3ff3e1 + 131abe5 commit 2e93ef1

File tree

42 files changed

+1923
-1381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1923
-1381
lines changed

.circleci/config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ jobs:
108108
- run:
109109
name: Get and post build sizes to GitHub PR
110110
command: |
111-
npm --prefix ./benchmarks install
112-
npm --prefix ./benchmarks run size:report
111+
./benchmarks/run.sh
113112
114113
check-qt-js:
115114
docker:

.github/auto_assign.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
addReviewers: true
2+
addAssignees: false
3+
reviewers:
4+
- badboy
5+
- Dexterp37
6+
- travis79
7+
- brizental
8+
- mdboom
9+
- chutten
10+
11+
numberOfReviewers: 1

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ updates:
1313
schedule:
1414
interval: "daily"
1515
- package-ecosystem: "npm"
16-
directory: "/glean/tests/platform/utils/webext/sample"
16+
directory: "/glean/tests/unit/platform/utils/webext/sample"
1717
schedule:
1818
interval: "daily"
1919
- package-ecosystem: "pip"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
* [#658](https://github.com/mozilla/glean.js/pull/658): Implement rate limiting for ping upload.
1111
* Only up to 15 ping submissions every 60 seconds are now allowed.
1212
* [#658](https://github.com/mozilla/glean.js/pull/658): BUGFIX: Unblock ping uploading jobs after the maximum of upload failures are hit for a given uploading window.
13+
* [#661](https://github.com/mozilla/glean.js/pull/661): Include unminified version of library on Qt/QML builds.
14+
* [#647](https://github.com/mozilla/glean.js/pull/647): Implement the Text metric type.
15+
* [#681](https://github.com/mozilla/glean.js/pull/681): BUGFIX: Fix error in scanning events database upon initialization on Qt/QML.
16+
* This bug prevents the changes introduced in [#526](https://github.com/mozilla/glean.js/pull/526) from working properly.
1317
* [#614](https://github.com/mozilla/glean.js/pull/614): Implement the String List metric type.
1418

1519
# v0.18.1 (2021-07-22)

benchmarks/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Glean.js size benchmarks
2+
3+
Compare the size of the different Glean bundles across the local `main` branch and the current checkout.
4+
5+
## How to run
6+
7+
To run a local report:
8+
9+
```
10+
npm run size:report:dry
11+
```
12+
13+
To run the report and post the results to a GitHub pull request:
14+
15+
```
16+
npm run size:report
17+
```
18+
19+
_Note: This requires a `GITHUB_TOKEN` and the CircleCI environment to know which PR to post to._

benchmarks/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
"type": "module",
77
"scripts": {
88
"link:glean": "cd ../glean && npm i && npm run build && npm link && cd ../benchmarks && npm link @mozilla/glean",
9-
"link:glean:main": "git stash && git checkout main && npm run link:glean && git checkout @{-1} && git stash apply",
109
"size:build:webext": "webpack --config ./size/webext/webpack.config.js",
1110
"size:build:webext:main": "npm run size:build:webext -- -o dist/size/webext/main",
1211
"size:build:qt": "mkdir -p ./dist/size/qt/ && cp ../glean/dist/qt/org/mozilla/Glean/glean.lib.js ./dist/size/qt/",
1312
"size:build:qt:main": "mkdir -p ./dist/size/qt/ && cp ../glean/dist/qt/org/mozilla/Glean/glean.lib.js ./dist/size/qt/glean.main.lib.js",
1413
"size:build": "run-s link:glean size:build:webext size:build:qt",
15-
"size:build:main": "run-s link:glean:main size:build:webext:main size:build:qt:main",
16-
"size:report:dry": "run-s size:build size:build:main && DRY_RUN=1 node --experimental-json-modules size/report.js",
17-
"size:report": "run-s size:build:main size:build && node --experimental-json-modules size/report.js"
14+
"size:build:main": "run-s link:glean size:build:webext:main size:build:qt:main",
15+
"size:report:dry": "DRY_RUN=1 ./run.sh",
16+
"size:report": "./run.sh"
1817
},
1918
"author": "The Glean Team <glean-team@mozilla.com>",
2019
"license": "MPL-2.0",

benchmarks/run.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
set -xe
4+
5+
WORKSPACE_ROOT="$( cd "$(dirname "$0")/.." ; pwd -P )"
6+
cd "$WORKSPACE_ROOT"
7+
8+
# Benchmark the main branch
9+
tmpdir=$(mktemp -d)
10+
git worktree add --force "${tmpdir}" main
11+
pushd "${tmpdir}"
12+
npm --prefix ./benchmarks install
13+
npm --prefix ./benchmarks run size:build:main
14+
cp -a "${tmpdir}/benchmarks/dist" "${WORKSPACE_ROOT}/benchmarks"
15+
popd
16+
git worktree remove --force "${tmpdir}"
17+
18+
# Benchmark the current code
19+
npm --prefix ./benchmarks install
20+
npm --prefix ./benchmarks run size:build
21+
22+
# Post the details
23+
node --experimental-json-modules benchmarks/size/report.js

benchmarks/size/webext/max.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import EventMetricType from "@mozilla/glean/webext/private/metrics/event";
1111
import LabeledMetricType from "@mozilla/glean/webext/private/metrics/labeled";
1212
import QuantityMetricType from "@mozilla/glean/webext/private/metrics/quantity";
1313
import StringMetricType from "@mozilla/glean/webext/private/metrics/string";
14+
import TextMetricType from "@mozilla/glean/webext/private/metrics/text";
1415
import TimespanMetricType from "@mozilla/glean/webext/private/metrics/timespan";
1516
import UUIDMetricType from "@mozilla/glean/webext/private/metrics/uuid";
1617
import URLMetricType from "@mozilla/glean/webext/private/metrics/url";
@@ -28,6 +29,7 @@ console.log(
2829
JSON.stringify(LabeledMetricType),
2930
JSON.stringify(QuantityMetricType),
3031
JSON.stringify(StringMetricType),
32+
JSON.stringify(TextMetricType),
3133
JSON.stringify(TimespanMetricType),
3234
JSON.stringify(UUIDMetricType),
3335
JSON.stringify(URLMetricType),

0 commit comments

Comments
 (0)