browsertime 26.2.0 → 26.3.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 +14 -0
- package/lib/core/engine/collector.js +6 -0
- package/lib/core/engine/command/simpleperf.js +28 -8
- package/lib/firefox/webdriver/firefox.js +1 -0
- package/lib/support/cli.js +4 -4
- package/package.json +1 -1
- package/types/core/engine/command/simpleperf.d.ts +2 -1
- package/types/core/engine/command/simpleperf.d.ts.map +1 -1
- package/types/support/filters.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Browsertime changelog (we do [semantic versioning](https://semver.org))
|
|
2
2
|
|
|
3
|
+
## 26.3.1 - 2026-01-11
|
|
4
|
+
### Fixed
|
|
5
|
+
* Reverting back to bidi-har 0.0.18. There where error/failures either in bidi har or in combination with browsertime in the latest release [#2360](https://github.com/sitespeedio/browsertime/pull/2360)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## 26.3.0 - 2026-01-09
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
* Get response bodies in the HAR for Firefox. Thank you [Julian Descottes](https://github.com/juliandescottes) and the rest of the Mozilla team that made this possible in bidi-har-export. Added in [#2359](https://github.com/sitespeedio/browsertime/pull/2359). The Firefox HAR has missed this functionality since we did the switch to bidi-har.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
* Restructure server timings so the timing name does not get lost for InfluxDB/Graphite. Thank you [Tim Oldenburg](https://github.com/TimOldenburg) for PR [#2358](https://github.com/sitespeedio/browsertime/pull/2358).
|
|
15
|
+
* Add Simpleperf app_profiler options and use `--android.simpleperf`. Thank you [Abhishek Nimalan](https://github.com/animalan) for PR [#2352](https://github.com/sitespeedio/browsertime/pull/2352)
|
|
16
|
+
|
|
3
17
|
## 26.2.0 - 2025-12-18
|
|
4
18
|
### Added
|
|
5
19
|
* Updated Chromedriver and Edgedriver to 143 [#2354](https://github.com/sitespeedio/browsertime/pull/2354) and[#2355](https://github.com/sitespeedio/browsertime/pull/2355).
|
|
@@ -219,6 +219,12 @@ export class Collector {
|
|
|
219
219
|
}, {});
|
|
220
220
|
} else if (equals(keyPath.slice(-1), ['resourceTimings'])) {
|
|
221
221
|
return {};
|
|
222
|
+
} else if (equals(keyPath.slice(-2), ['timings', 'serverTimings'])) {
|
|
223
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
224
|
+
return value.reduce((result, timing) => {
|
|
225
|
+
result[timing.name] = timing.duration;
|
|
226
|
+
return result;
|
|
227
|
+
}, {});
|
|
222
228
|
}
|
|
223
229
|
return value;
|
|
224
230
|
});
|
|
@@ -14,7 +14,7 @@ import { isAndroidConfigured } from '../../../android/index.js';
|
|
|
14
14
|
|
|
15
15
|
const log = getLogger('browsertime.command.simpleperf');
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const defaultRecordOptions =
|
|
18
18
|
'--call-graph fp --duration 240 -f 1000 --trace-offcpu -e cpu-clock';
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -72,7 +72,11 @@ export class SimplePerfProfiler {
|
|
|
72
72
|
* @throws {Error} Throws an error if app_profiler.py fails to execute.
|
|
73
73
|
*/
|
|
74
74
|
|
|
75
|
-
async start(
|
|
75
|
+
async start(
|
|
76
|
+
profilerOptions = [],
|
|
77
|
+
recordOptions = defaultRecordOptions,
|
|
78
|
+
dirName = 'simpleperf'
|
|
79
|
+
) {
|
|
76
80
|
if (!isAndroidConfigured(this.options)) {
|
|
77
81
|
throw new Error('Simpleperf profiling is only available on Android.');
|
|
78
82
|
}
|
|
@@ -83,6 +87,8 @@ export class SimplePerfProfiler {
|
|
|
83
87
|
let dirname = `${dirName}-${this.index}`;
|
|
84
88
|
let counter = 0;
|
|
85
89
|
|
|
90
|
+
this.profilerOptions = profilerOptions;
|
|
91
|
+
|
|
86
92
|
while (true) {
|
|
87
93
|
log.info(`Checking if ${dirname} exists...`);
|
|
88
94
|
|
|
@@ -102,13 +108,14 @@ export class SimplePerfProfiler {
|
|
|
102
108
|
this.options.browser === 'firefox'
|
|
103
109
|
? this.options.firefox?.android?.package
|
|
104
110
|
: this.options.chrome?.android?.package;
|
|
105
|
-
let
|
|
106
|
-
let cmd =
|
|
111
|
+
let simpleperfPath = this.options.androidSimpleperf;
|
|
112
|
+
let cmd = join(simpleperfPath, 'app_profiler.py');
|
|
107
113
|
let args = [
|
|
114
|
+
...profilerOptions,
|
|
108
115
|
'-p',
|
|
109
116
|
packageName,
|
|
110
117
|
'-r',
|
|
111
|
-
|
|
118
|
+
recordOptions,
|
|
112
119
|
'--log',
|
|
113
120
|
'debug',
|
|
114
121
|
'-o',
|
|
@@ -167,11 +174,24 @@ export class SimplePerfProfiler {
|
|
|
167
174
|
stderrStream.on('data', data => {
|
|
168
175
|
const dataStr = data.toString();
|
|
169
176
|
log.info(dataStr);
|
|
177
|
+
// Resolve immediately if -nb or --skip_collect_binaries is passed
|
|
178
|
+
// into the app_profiler options as a binary cache will not be produced.
|
|
179
|
+
if (
|
|
180
|
+
this.profilerOptions.includes('-nb') ||
|
|
181
|
+
this.profilerOptions.includes('--skip_collect_binaries')
|
|
182
|
+
) {
|
|
183
|
+
stderrStream.removeAllListeners('data');
|
|
184
|
+
return resolve();
|
|
185
|
+
}
|
|
170
186
|
if (/profiling is finished./.test(dataStr)) {
|
|
171
187
|
stderrStream.removeAllListeners('data');
|
|
172
|
-
// There is no way to specify the output of binary_cache,
|
|
173
|
-
// it into the data directory.
|
|
174
|
-
|
|
188
|
+
// There is no way to specify the output of binary_cache,
|
|
189
|
+
// so manually move it (if it exists) into the data directory.
|
|
190
|
+
if (existsSync('binary_cache')) {
|
|
191
|
+
renameSync('binary_cache', join(this.dataDir, 'binary_cache'));
|
|
192
|
+
} else {
|
|
193
|
+
log.info('binary_cache does not exist.');
|
|
194
|
+
}
|
|
175
195
|
return resolve();
|
|
176
196
|
}
|
|
177
197
|
});
|
|
@@ -67,6 +67,7 @@ export class Firefox {
|
|
|
67
67
|
browsingContextIds: [this.windowId],
|
|
68
68
|
debugLogs:
|
|
69
69
|
this.options.verbose >= 2 || this.firefoxConfig.enableBidiHarLog,
|
|
70
|
+
maxBodySize: this.includeResponseBodies === 'all' ? 10_485_760 : 1,
|
|
70
71
|
driver: runner.getDriver(),
|
|
71
72
|
headerValueFormatter: this.options.cleanSensitiveHeaders
|
|
72
73
|
? cleanSensitiveHeaders
|
package/lib/support/cli.js
CHANGED
|
@@ -470,7 +470,7 @@ export function parseCommandLine() {
|
|
|
470
470
|
.option('firefox.includeResponseBodies', {
|
|
471
471
|
describe: 'Include response bodies in HAR',
|
|
472
472
|
default: 'none',
|
|
473
|
-
choices: ['none', 'all'
|
|
473
|
+
choices: ['none', 'all'],
|
|
474
474
|
group: 'firefox'
|
|
475
475
|
})
|
|
476
476
|
.option('firefox.appconstants', {
|
|
@@ -837,10 +837,10 @@ export function parseCommandLine() {
|
|
|
837
837
|
'Before a test start, verify that the device has a Internet connection by pinging 8.8.8.8 (or a configurable domain with --androidPingAddress)',
|
|
838
838
|
group: 'android'
|
|
839
839
|
})
|
|
840
|
-
.option('android.
|
|
841
|
-
alias: '
|
|
840
|
+
.option('android.simpleperf', {
|
|
841
|
+
alias: 'androidSimpleperf',
|
|
842
842
|
type: 'string',
|
|
843
|
-
describe: 'Path to the
|
|
843
|
+
describe: 'Path to the Simpleperf profiler from the Android NDK.',
|
|
844
844
|
group: 'android'
|
|
845
845
|
})
|
|
846
846
|
.option('android.perfettoTrace', {
|
package/package.json
CHANGED
|
@@ -27,7 +27,8 @@ export class SimplePerfProfiler {
|
|
|
27
27
|
* @returns {Promise<void>} A promise that resolves when simpleperf has started profiling.
|
|
28
28
|
* @throws {Error} Throws an error if app_profiler.py fails to execute.
|
|
29
29
|
*/
|
|
30
|
-
start(profilerOptions?: string, dirName?: string): Promise<void>;
|
|
30
|
+
start(profilerOptions?: any[], recordOptions?: string, dirName?: string): Promise<void>;
|
|
31
|
+
profilerOptions: any[];
|
|
31
32
|
dataDir: any;
|
|
32
33
|
simpleperfProcess: import("execa").ResultPromise<{}>;
|
|
33
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleperf.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/simpleperf.js"],"names":[],"mappings":"AA0CA;IACE,yEAqBC;IApBC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,uBAAoC;IACpC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,cAAkB;IAClB;;OAEG;IACH,gBAAoB;IAGtB;;;;;;OAMG;IAEH,
|
|
1
|
+
{"version":3,"file":"simpleperf.d.ts","sourceRoot":"","sources":["../../../../lib/core/engine/command/simpleperf.js"],"names":[],"mappings":"AA0CA;IACE,yEAqBC;IApBC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,uBAAoC;IACpC;;OAEG;IACH,gBAAsB;IACtB;;OAEG;IACH,cAAkB;IAClB;;OAEG;IACH,gBAAoB;IAGtB;;;;;;OAMG;IAEH,0EAJa,OAAO,CAAC,IAAI,CAAC,CA6EzB;IA1DC,uBAAsC;IAUlC,aAAkE;IAwBtE,qDAAyC;IA0B3C;;;;;;;OAOG;IACH,QAJa,OAAO,CAAC,IAAI,CAAC,CA8CzB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../lib/support/filters.js"],"names":[],"mappings":"AAKA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../lib/support/filters.js"],"names":[],"mappings":"AAKA;;GAEG;AACH,oDACS,aAAQ,aAChB;AACD,2DAGC;AACD,iEAGC"}
|