browsertime 16.13.1 → 16.14.0
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/lib/chrome/webdriver/chromium.js +4 -0
- package/lib/core/engine/collector.js +5 -4
- package/lib/core/engine/command/measure.js +9 -0
- package/lib/core/engine/index.js +0 -1
- package/lib/core/engine/iteration.js +7 -1
- package/lib/support/har/index.js +2 -0
- package/lib/support/processes.js +7 -0
- package/lib/support/statistics.js +1 -0
- package/lib/support/util.js +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 16.14.0 - 2022-08-26
|
|
4
|
+
### Added
|
|
5
|
+
* 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.
|
|
6
|
+
* 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).
|
|
7
|
+
## 16.13.3 - 2022-08-17
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
* Make sure set cookies work when navigating in script for Chrome/Edge [#1830](https://github.com/sitespeedio/browsertime/pull/1830).
|
|
11
|
+
|
|
12
|
+
## 16.13.2 - 2022-08-14
|
|
13
|
+
### Fixed
|
|
14
|
+
* Disable adding lastCPULongTask to the HAR data since it breaks waterfall view on slow mobile phones with late CPU long tasks [#1828](https://github.com/sitespeedio/browsertime/pull/1828).
|
|
15
|
+
|
|
3
16
|
## 16.13.1 - 2022-08-10
|
|
4
17
|
### Fixed
|
|
5
18
|
* Make sure that Android id is always picked up from the phone if tests run on Android [#1826](https://github.com/sitespeedio/browsertime/pull/1826).
|
|
@@ -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 || []);
|
|
@@ -141,6 +141,15 @@ class Measure {
|
|
|
141
141
|
log.info('Navigating to url %s iteration %s', url, this.index);
|
|
142
142
|
if (this.numberOfVisitedPages === 0) {
|
|
143
143
|
await this.extensionServer.setup(url, this.browser, this.options);
|
|
144
|
+
|
|
145
|
+
// There's a bug that we introduced when moving cookie handling to CDP
|
|
146
|
+
// and this is the hack to fix that.
|
|
147
|
+
if (
|
|
148
|
+
(this.options.cookie && this.options.browser === 'chrome') ||
|
|
149
|
+
this.options.browser === 'edge'
|
|
150
|
+
) {
|
|
151
|
+
await this.engineDelegate.setCookies(url, this.options.cookie);
|
|
152
|
+
}
|
|
144
153
|
}
|
|
145
154
|
if (this.numberOfVisitedPages === 0) {
|
|
146
155
|
await this.engineDelegate.beforeStartIteration(this.browser, this.index);
|
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);
|
package/lib/support/har/index.js
CHANGED
|
@@ -91,9 +91,11 @@ function addExtrasToHAR(
|
|
|
91
91
|
harPageTimings._firstPaint = timings.firstPaint;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
/*
|
|
94
95
|
if (cpu && cpu.longTasks && cpu.longTasks.lastLongTask) {
|
|
95
96
|
harPageTimings._lastCPULongTask = cpu.longTasks.lastLongTask;
|
|
96
97
|
}
|
|
98
|
+
*/
|
|
97
99
|
|
|
98
100
|
if (timings && timings.largestContentfulPaint) {
|
|
99
101
|
harPageTimings._largestContentfulPaint =
|
|
@@ -168,6 +168,7 @@ 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: parseFloat((100 * stats.stddev()) / stats.amean()), // Relative standard deviation
|
|
171
172
|
stddev: parseFloat(stats.stddev().toFixed(decimals))
|
|
172
173
|
};
|
|
173
174
|
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.0",
|
|
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": {
|