browsertime 16.11.2 → 16.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/browserscripts/pageinfo/longTask.js +25 -21
- package/browsertime/visualmetrics-portable.py +9 -7
- package/lib/chrome/chromeDevtoolsProtocol.js +0 -13
- package/lib/chrome/webdriver/chromium.js +0 -2
- package/lib/video/postprocessing/visualmetrics/visualMetrics.js +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 16.11.3 - 2022-07-14
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
* If one of the visual elements failed, all failed. Fixed in [#1818](https://github.com/sitespeedio/browsertime/pull/1818).
|
|
7
|
+
* Use buffered long tasks instead of injecting the measuremnt in the page [#1817](https://github.com/sitespeedio/browsertime/pull/1817).
|
|
8
|
+
* Fixed broken CHromedriver and Geckodriver install on Windows.
|
|
9
|
+
|
|
3
10
|
## 16.11.2 - 2022-07-05
|
|
4
11
|
### Fixed
|
|
5
12
|
* Updated Geckodriver install, it will autoamtically pickup Geckodriver in the path for Raspberry Pis.
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
(function(minLength) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
2
|
+
const supported = PerformanceObserver.supportedEntryTypes;
|
|
3
|
+
if (!supported || supported.indexOf('longtask') === -1) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
const observer = new PerformanceObserver(list => {});
|
|
7
|
+
observer.observe({type: 'longtask', buffered: true});
|
|
8
|
+
const entries = observer.takeRecords();
|
|
9
|
+
const cleaned = [];
|
|
10
|
+
for (let event of entries) {
|
|
11
|
+
if (event.duration >= minLength) {
|
|
12
|
+
const e = {};
|
|
13
|
+
e.duration = event.duration;
|
|
14
|
+
e.name = event.name;
|
|
15
|
+
e.startTime = event.startTime;
|
|
16
|
+
e.attribution = [];
|
|
17
|
+
for (let at of event.attribution) {
|
|
18
|
+
const a = {};
|
|
19
|
+
a.containerId = at.containerId;
|
|
20
|
+
a.containerName = at.containerName;
|
|
21
|
+
a.containerSrc = at.containerSrc;
|
|
22
|
+
a.containerType = at.containerType;
|
|
23
|
+
e.attribution.push(a);
|
|
20
24
|
}
|
|
25
|
+
cleaned.push(e);
|
|
21
26
|
}
|
|
22
|
-
window.__bt_longtask.e = [];
|
|
23
|
-
return cleaned;
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
return cleaned;
|
|
29
|
+
})(arguments[arguments.length - 1]);
|
|
@@ -1266,14 +1266,16 @@ def calculate_visual_metrics(
|
|
|
1266
1266
|
viewport = hero_data["viewport"]
|
|
1267
1267
|
hero_timings = []
|
|
1268
1268
|
for hero in hero_data["heroes"]:
|
|
1269
|
-
|
|
1270
|
-
{
|
|
1271
|
-
"name": hero["name"],
|
|
1272
|
-
"value": calculate_hero_time(
|
|
1269
|
+
hero_time = calculate_hero_time(
|
|
1273
1270
|
progress, dirs, hero, viewport
|
|
1274
|
-
)
|
|
1275
|
-
|
|
1276
|
-
|
|
1271
|
+
)
|
|
1272
|
+
if hero_time is not None:
|
|
1273
|
+
hero_timings.append(
|
|
1274
|
+
{
|
|
1275
|
+
"name": hero["name"],
|
|
1276
|
+
"value": hero_time,
|
|
1277
|
+
}
|
|
1278
|
+
)
|
|
1277
1279
|
hero_timings_sorted = sorted(
|
|
1278
1280
|
hero_timings, key=lambda timing: timing["value"]
|
|
1279
1281
|
)
|
|
@@ -108,19 +108,6 @@ class ChromeDevtoolsProtocol {
|
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
async setupLongTask() {
|
|
112
|
-
const source = `
|
|
113
|
-
!function() {
|
|
114
|
-
let lt = window.__bt_longtask={e:[]};
|
|
115
|
-
lt.o = new PerformanceObserver(function(a) {
|
|
116
|
-
lt.e=lt.e.concat(a.getEntries());
|
|
117
|
-
});
|
|
118
|
-
lt.o.observe({entryTypes:['longtask']});
|
|
119
|
-
}();`;
|
|
120
|
-
|
|
121
|
-
return this.cdpClient.Page.addScriptToEvaluateOnNewDocument({ source });
|
|
122
|
-
}
|
|
123
|
-
|
|
124
111
|
async setBasicAuth(basicAuth) {
|
|
125
112
|
const parts = basicAuth.split('@');
|
|
126
113
|
const basic = 'Basic ' + btoa(parts[0] + ':' + parts[1]);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Browsertime",
|
|
3
|
-
"version": "16.11.
|
|
3
|
+
"version": "16.11.3",
|
|
4
4
|
"bin": "./bin/browsertime.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@cypress/xvfb": "1.2.4",
|
|
7
7
|
"@devicefarmer/adbkit": "2.11.3",
|
|
8
|
-
"@sitespeed.io/chromedriver": "103.0.5060-
|
|
8
|
+
"@sitespeed.io/chromedriver": "103.0.5060-24b",
|
|
9
9
|
"@sitespeed.io/edgedriver": "103.0.1264-37",
|
|
10
|
-
"@sitespeed.io/geckodriver": "0.31.0-
|
|
10
|
+
"@sitespeed.io/geckodriver": "0.31.0-c",
|
|
11
11
|
"@sitespeed.io/throttle": "4.0.1",
|
|
12
12
|
"@sitespeed.io/tracium": "0.3.3",
|
|
13
13
|
"btoa": "1.2.1",
|