browsertime 14.17.0 → 14.19.1

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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # Browsertime changelog (we do [semantic versioning](https://semver.org))
2
2
 
3
+
4
+ ## 14.19.1 - 2022-02-03
5
+ ### Fixed
6
+ * Remove the old fix for setting CPUThrottling, that works now in Chrome without that fix [#1708](https://github.com/sitespeedio/browsertime/pull/1708).
7
+ * Do not set binary for Firefox when run on Android [#1706](https://github.com/sitespeedio/browsertime/pull/1706).
8
+
9
+ ## 14.19.0 - 2022-02-02
10
+
11
+ ### Added
12
+ * Chrome and Chromedriver 98 [#1704](https://github.com/sitespeedio/browsertime/pull/1704).
13
+
14
+ ### Fixed
15
+ * Fix so we get the Firefox version on Android [#1704](https://github.com/sitespeedio/browsertime/pull/1704).
16
+
17
+ ## 14.18.1 - 2022-01-24
18
+ ### Fixed
19
+ * If loading a URL failed and we retry and we logged that as an info message, but you as a user only need to know if it fails after X retries. The log message now logs at debug level [#1701](https://github.com/sitespeedio/browsertime/pull/1701).
20
+ * The summary log message `[2022-01-24 16:12:38] INFO: https://www.sitespeed.io 27 requests, TTFB: 962ms (σ917.00ms), firstPaint: 2.92s (σ3.07s), firstVisualChange: 2.94s (σ3.07s), FCP: 2.92s (σ3.07s), DOMContentLoaded: 3.22s (σ2.98s), LCP: 2.92s (σ3.07s), CLS: 0.0389 (σ0.03), TBT: 769ms (σ53.00ms), Load: 3.77s (σ3.12s), speedIndex: 2.96s (σ3.07s), visualComplete85: 2.95s (σ3.06s), lastVisualChange: 4.54s (σ3.30s) (21 runs)` that summaries all the runs used mean instead of median metric. That sucks when you do many runs and want to compare them. That is now fixed to show median number instead [#1700](https://github.com/sitespeedio/browsertime/pull/1700).
21
+
22
+ ## 14.18.0 - 2022-01-24
23
+ ### Added
24
+ * Updated to Edge stable in the Docker container.
25
+
26
+ ### Fixed
27
+ * A more safe way to get dockumentURI for Firefox. See PR [#1699](https://github.com/sitespeedio/browsertime/pull/1699) and bug [#1698](https://github.com/sitespeedio/browsertime/issues/1698).
28
+
3
29
  ## 14.17.0 - 2022-01-23
4
30
  ### Added
5
31
  * New Select command [#1696](https://github.com/sitespeedio/browsertime/pull/1696):
@@ -13,6 +39,8 @@
13
39
 
14
40
  * New click by name command `click.byName(name)` [#1697](https://github.com/sitespeedio/browsertime/pull/1697).
15
41
 
42
+ ### Fixed
43
+ * Remove the top 10 rows of the image to handle progress bars on some mobile browser recordings. Thank you [Gregory Mierzwinski](https://github.com/gmierz) for PR [#1687](https://github.com/sitespeedio/browsertime/pull/1687).
16
44
 
17
45
  ## 14.16.0 - 2022-01-14
18
46
  ### Added
@@ -25,14 +25,6 @@ module.exports = function (seleniumOptions, browserOptions, options, baseDir) {
25
25
  seleniumOptions.addArguments('--disable-setuid-sandbox');
26
26
  }
27
27
 
28
- // Running CPU throttling in Chrome desktop is broken. It works in
29
- // headless mode
30
- if (browserOptions.CPUThrottlingRate) {
31
- seleniumOptions.addArguments(
32
- '--disable-features=IsolateOrigins,site-per-process'
33
- );
34
- }
35
-
36
28
  if (options.xvfb && (options.xvfb === true || options.xvfb === 'true')) {
37
29
  seleniumOptions.addArguments('--disable-gpu');
38
30
  }
@@ -345,7 +345,19 @@ class Engine {
345
345
  // Just swallow
346
346
  }
347
347
  }
348
+ } // We don't have a HAR for Firefox on Android
349
+ else if (options.browser === 'firefox' && options.android) {
350
+ for (let result of totalResult) {
351
+ result.info.browser.name = 'Firefox';
352
+ try {
353
+ const vString = result.info.browser.userAgent.split('Firefox/')[1];
354
+ result.info.browser.version = vString;
355
+ } catch (e) {
356
+ // Just swallow
357
+ }
358
+ }
348
359
  }
360
+
349
361
  util.logResultLogLine(totalResult);
350
362
 
351
363
  if (failures.length > 0) {
@@ -222,9 +222,23 @@ class SeleniumRunner {
222
222
  // query parameters, order fragments, etc. We don't want to change url itself 'cuz it can be
223
223
  // used for indexing collected data and it is possible that normalization could change a key.
224
224
  const normalizedURI = new URL(url).toString();
225
- const startURI = new URL(
226
- await driver.executeScript('return document.documentURI;')
227
- ).toString();
225
+
226
+ // See https://github.com/sitespeedio/browsertime/issues/1698
227
+ const retries = 5;
228
+ let documentURI;
229
+ for (var i = 0; i < retries; i++) {
230
+ documentURI = await driver.executeScript('return document.documentURI;');
231
+ if (documentURI != null) {
232
+ break;
233
+ }
234
+ await delay(1000);
235
+ }
236
+ let startURI;
237
+ try {
238
+ startURI = new URL(documentURI).toString();
239
+ } catch (e) {
240
+ log.error(`Failed to get documentURI ${documentURI}`, e);
241
+ }
228
242
  if (this.options.webdriverPageload) {
229
243
  const clearOrange = `(function() {
230
244
  const orange = document.getElementById('browsertime-orange');
@@ -297,7 +311,7 @@ class SeleniumRunner {
297
311
  } else {
298
312
  const waitTime = (this.options.retryWaitTime || 10000) * (i + 1);
299
313
  totalWaitTime += waitTime;
300
- log.info(
314
+ log.debug(
301
315
  `URL ${url} failed to load, the ${
302
316
  this.options.browser
303
317
  } are still on ${startURI} , trying ${
@@ -172,9 +172,14 @@ module.exports.configureBuilder = function (builder, baseDir, options) {
172
172
  return n !== undefined;
173
173
  });
174
174
 
175
- ffOptions.setBinary(
176
- firefoxTypes.length > 0 ? firefoxTypes[0] : firefox.Channel.RELEASE
177
- );
175
+ // Do not set binary when using Android
176
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1751196
177
+
178
+ if (!options.android) {
179
+ ffOptions.setBinary(
180
+ firefoxTypes.length > 0 ? firefoxTypes[0] : firefox.Channel.RELEASE
181
+ );
182
+ }
178
183
 
179
184
  ffOptions.addArguments('-no-remote');
180
185
 
@@ -16,7 +16,7 @@ module.exports = {
16
16
  } else return value;
17
17
  }
18
18
 
19
- let formatted = `${name}: ${fmt(multiple ? metric.mean : metric)}`;
19
+ let formatted = `${name}: ${fmt(multiple ? metric.median : metric)}`;
20
20
  if (extras) {
21
21
  formatted += ` (σ${fmt(metric.stddev.toFixed(2))})`;
22
22
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "description": "Browsertime",
3
- "version": "14.17.0",
3
+ "version": "14.19.1",
4
4
  "bin": "./bin/browsertime.js",
5
5
  "dependencies": {
6
6
  "@sitespeed.io/throttle": "3.0.0",
7
7
  "@devicefarmer/adbkit": "2.11.3",
8
8
  "btoa": "1.2.1",
9
- "@sitespeed.io/chromedriver": "97.0.4692-7b",
9
+ "@sitespeed.io/chromedriver": "98.0.4758-48",
10
10
  "chrome-har": "0.12.0",
11
11
  "chrome-remote-interface": "0.31.0",
12
12
  "dayjs": "1.10.7",