browsertime 16.13.3 → 16.14.2
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 +13 -0
- package/bin/browsertime.js +8 -5
- package/lib/core/engine/collector.js +5 -4
- package/lib/core/engine/index.js +0 -1
- package/lib/core/engine/iteration.js +7 -1
- package/lib/support/processes.js +7 -0
- package/lib/support/statistics.js +4 -0
- package/lib/support/util.js +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## 16.14.2 - 2022-08-26
|
|
5
|
+
### Fixed
|
|
6
|
+
* Using `--preWarmServer` didn't work on Android/iOS [#1837](https://github.com/sitespeedio/browsertime/pull/1837).
|
|
7
|
+
## 16.14.1 - 2022-08-26
|
|
8
|
+
### Fixed
|
|
9
|
+
* Guard relative standard deviation agains 0 standard deviation [#1835](https://github.com/sitespeedio/browsertime/pull/1835).
|
|
10
|
+
## 16.14.0 - 2022-08-26
|
|
11
|
+
### Added
|
|
12
|
+
* Collect relative standard deviation and output that in the cli output [#1834](https://github.com/sitespeedio/browsertime/pull/1834). Before we only showed the actual standard deviation, with this fix we also show it in percentage, that makes it easier if you run tests on different hardware/networks and want to compare them.
|
|
13
|
+
* Collect number of processes that runs on the server that do the testing, before a test starts [#1833](https://github.com/sitespeedio/browsertime/pull/1833).
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
* Updated to Selenium 4.4.0 and Throttle 5.0.0.
|
|
4
17
|
## 16.13.3 - 2022-08-17
|
|
5
18
|
|
|
6
19
|
### Fixed
|
package/bin/browsertime.js
CHANGED
|
@@ -44,19 +44,22 @@ async function preWarmServer(urls, options) {
|
|
|
44
44
|
const safariDeviceName = get(options, 'safari.deviceName');
|
|
45
45
|
const safariDeviceUDID = get(options, 'safari.deviceUDID ');
|
|
46
46
|
|
|
47
|
+
if (options.android && options.browser === 'chrome') {
|
|
48
|
+
set(preWarmOptions, 'chrome.android.package', 'com.android.chrome');
|
|
49
|
+
}
|
|
47
50
|
if (chromeDevice) {
|
|
48
|
-
set(
|
|
51
|
+
set(preWarmOptions, 'chrome.android.deviceSerial', chromeDevice);
|
|
49
52
|
} else if (firefoxDevice) {
|
|
50
|
-
set(
|
|
53
|
+
set(preWarmOptions, 'firefox.android.deviceSerial', firefoxDevice);
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
if (safariIos) {
|
|
54
|
-
set(
|
|
57
|
+
set(preWarmOptions, 'safari.ios', true);
|
|
55
58
|
if (safariDeviceName) {
|
|
56
|
-
set(
|
|
59
|
+
set(preWarmOptions, 'safari.deviceName', safariDeviceName);
|
|
57
60
|
}
|
|
58
61
|
if (safariDeviceUDID) {
|
|
59
|
-
set(
|
|
62
|
+
set(preWarmOptions, 'safari.deviceUDID', safariDeviceUDID);
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
65
|
|
|
@@ -48,7 +48,8 @@ function getNewResult(url, options) {
|
|
|
48
48
|
extras: [],
|
|
49
49
|
fullyLoaded: [],
|
|
50
50
|
mainDocumentTimings: [],
|
|
51
|
-
errors: []
|
|
51
|
+
errors: [],
|
|
52
|
+
server: { processesAtStart: [] }
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -183,9 +184,6 @@ class Collector {
|
|
|
183
184
|
|
|
184
185
|
if (allData.batteryTemperature) {
|
|
185
186
|
results.android.batteryTemperature.push(allData.batteryTemperature);
|
|
186
|
-
statistics.addDeep({
|
|
187
|
-
android: { batteryTemperature: allData.batteryTemperature }
|
|
188
|
-
});
|
|
189
187
|
}
|
|
190
188
|
|
|
191
189
|
if (allData.markedAsFailure) {
|
|
@@ -193,6 +191,9 @@ class Collector {
|
|
|
193
191
|
results.failureMessages = allData.failureMessages;
|
|
194
192
|
}
|
|
195
193
|
|
|
194
|
+
if (allData.processesAtStart) {
|
|
195
|
+
results.server.processesAtStart.push(allData.processesAtStart);
|
|
196
|
+
}
|
|
196
197
|
// If we don't have an error, use an empty array. In the future we want to push
|
|
197
198
|
// more than one errors per run (maybe).
|
|
198
199
|
results.errors.push(data.error || []);
|
package/lib/core/engine/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
2
|
+
const os = require('os');
|
|
3
3
|
const webdriver = require('selenium-webdriver');
|
|
4
4
|
const log = require('intel').getLogger('browsertime');
|
|
5
5
|
const SeleniumRunner = require('../seleniumRunner');
|
|
@@ -35,6 +35,7 @@ const {
|
|
|
35
35
|
ContextClick,
|
|
36
36
|
MouseMove
|
|
37
37
|
} = require('./command/mouse/');
|
|
38
|
+
const getNumberOfRunningProcesses = require('../../support/processes');
|
|
38
39
|
|
|
39
40
|
const { isAndroidConfigured, Android } = require('../../android');
|
|
40
41
|
const Scroll = require('./command/scroll');
|
|
@@ -84,6 +85,9 @@ class Iteration {
|
|
|
84
85
|
* @param {*} index - Which iteration it is
|
|
85
86
|
*/
|
|
86
87
|
async run(navigationScript, index) {
|
|
88
|
+
if (os.platform() === 'darwin' || os.platform() === 'linux') {
|
|
89
|
+
this.processesAtStart = new Number(await getNumberOfRunningProcesses());
|
|
90
|
+
}
|
|
87
91
|
const screenshotManager = new ScreenshotManager(
|
|
88
92
|
this.storageManager,
|
|
89
93
|
this.options
|
|
@@ -316,6 +320,8 @@ class Iteration {
|
|
|
316
320
|
if (commands.meta.title) {
|
|
317
321
|
result.title = commands.meta.title;
|
|
318
322
|
}
|
|
323
|
+
|
|
324
|
+
result.processesAtStart = this.processesAtStart;
|
|
319
325
|
return result;
|
|
320
326
|
} catch (e) {
|
|
321
327
|
log.error(e);
|
|
@@ -168,6 +168,10 @@ class Statistics {
|
|
|
168
168
|
median: parseFloat(stats.median().toFixed(decimals)),
|
|
169
169
|
mean: parseFloat(stats.amean().toFixed(decimals)),
|
|
170
170
|
mdev: parseFloat((stats.stddev() / Math.sqrt(stats.length)).toFixed(4)), // "standard deviation of the mean"
|
|
171
|
+
rsd:
|
|
172
|
+
stats.stddev() > 0
|
|
173
|
+
? parseFloat((100 * stats.stddev()) / stats.amean())
|
|
174
|
+
: 0, // Relative standard deviation
|
|
171
175
|
stddev: parseFloat(stats.stddev().toFixed(decimals))
|
|
172
176
|
};
|
|
173
177
|
percentiles.forEach(p => {
|
package/lib/support/util.js
CHANGED
|
@@ -18,7 +18,9 @@ module.exports = {
|
|
|
18
18
|
|
|
19
19
|
let formatted = `${name}: ${fmt(multiple ? metric.median : metric)}`;
|
|
20
20
|
if (extras) {
|
|
21
|
-
formatted += ` (σ${fmt(metric.stddev.toFixed(2))}
|
|
21
|
+
formatted += ` (σ${fmt(metric.stddev.toFixed(2))} ${
|
|
22
|
+
metric.stddev > 0 ? metric.rsd.toFixed(1) : '0'
|
|
23
|
+
}%)`;
|
|
22
24
|
}
|
|
23
25
|
return formatted;
|
|
24
26
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "Browsertime",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.14.2",
|
|
4
4
|
"bin": "./bin/browsertime.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@cypress/xvfb": "1.2.4",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@sitespeed.io/chromedriver": "104.0.5112-29",
|
|
9
9
|
"@sitespeed.io/edgedriver": "104.0.1293-47",
|
|
10
10
|
"@sitespeed.io/geckodriver": "0.31.0-c",
|
|
11
|
-
"@sitespeed.io/throttle": "
|
|
11
|
+
"@sitespeed.io/throttle": "5.0.0",
|
|
12
12
|
"@sitespeed.io/tracium": "0.3.3",
|
|
13
13
|
"btoa": "1.2.1",
|
|
14
14
|
"chrome-har": "0.13.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lodash.merge": "4.6.2",
|
|
27
27
|
"lodash.pick": "4.4.0",
|
|
28
28
|
"lodash.set": "4.3.2",
|
|
29
|
-
"selenium-webdriver": "4.
|
|
29
|
+
"selenium-webdriver": "4.4.0",
|
|
30
30
|
"yargs": "17.4.1"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|