browsertime 27.5.0 → 28.1.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 +34 -2
- package/bin/browsertime.js +28 -4
- package/browserscripts/pageinfo/loaf.js +15 -0
- package/browserscripts/pageinfo/loafSummary.js +24 -0
- package/lib/chrome/coverage.js +89 -19
- package/lib/chrome/mediawikiResourceLoader.js +225 -0
- package/lib/chrome/parseCpuTrace.js +87 -2
- package/lib/chrome/trace/blocking-time.js +189 -0
- package/lib/chrome/trace/domain-breakdown.js +86 -0
- package/lib/chrome/trace/frame-stability.js +135 -0
- package/lib/chrome/trace/function-costs.js +281 -0
- package/lib/chrome/trace/index.js +7 -0
- package/lib/chrome/trace/module-costs.js +137 -0
- package/lib/chrome/trace/non-composited-animations.js +50 -5
- package/lib/chrome/trace/selector-stats.js +110 -0
- package/lib/chrome/trace/style-invalidations.js +162 -0
- package/lib/chrome/trace/task-groups.js +28 -2
- package/lib/chrome/trace/timer-costs.js +183 -0
- package/lib/chrome/webdriver/chromium.js +128 -0
- package/lib/chrome/webdriver/traceUtilities.js +11 -1
- package/lib/core/engine/collector.js +12 -0
- package/lib/core/engine/index.js +6 -0
- package/lib/support/cli.js +1 -1
- package/lib/support/har/index.js +44 -1
- package/package.json +4 -4
- package/types/chrome/mediawikiResourceLoader.d.ts +11 -0
- package/types/chrome/mediawikiResourceLoader.d.ts.map +1 -0
- package/types/chrome/parseCpuTrace.d.ts +1 -26
- package/types/chrome/parseCpuTrace.d.ts.map +1 -1
- package/types/chrome/trace/blocking-time.d.ts +7 -0
- package/types/chrome/trace/blocking-time.d.ts.map +1 -0
- package/types/chrome/trace/domain-breakdown.d.ts +11 -0
- package/types/chrome/trace/domain-breakdown.d.ts.map +1 -0
- package/types/chrome/trace/frame-stability.d.ts +11 -0
- package/types/chrome/trace/frame-stability.d.ts.map +1 -0
- package/types/chrome/trace/function-costs.d.ts +6 -0
- package/types/chrome/trace/function-costs.d.ts.map +1 -0
- package/types/chrome/trace/index.d.ts +7 -0
- package/types/chrome/trace/index.d.ts.map +1 -1
- package/types/chrome/trace/module-costs.d.ts +20 -0
- package/types/chrome/trace/module-costs.d.ts.map +1 -0
- package/types/chrome/trace/non-composited-animations.d.ts +1 -25
- package/types/chrome/trace/non-composited-animations.d.ts.map +1 -1
- package/types/chrome/trace/selector-stats.d.ts +8 -0
- package/types/chrome/trace/selector-stats.d.ts.map +1 -0
- package/types/chrome/trace/style-invalidations.d.ts +9 -0
- package/types/chrome/trace/style-invalidations.d.ts.map +1 -0
- package/types/chrome/trace/task-groups.d.ts.map +1 -1
- package/types/chrome/trace/timer-costs.d.ts +10 -0
- package/types/chrome/trace/timer-costs.d.ts.map +1 -0
- package/types/chrome/webdriver/traceUtilities.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browsertime",
|
|
3
3
|
"description": "Get performance metrics from your web page using Browsertime.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "28.1.0",
|
|
5
5
|
"bin": "./bin/browsertime.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./scripting.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@sitespeed.io/edgedriver": "149.0.4022",
|
|
12
12
|
"@sitespeed.io/geckodriver": "0.36.2",
|
|
13
13
|
"@sitespeed.io/log": "2.0.0",
|
|
14
|
-
"@sitespeed.io/throttle": "6.0.
|
|
14
|
+
"@sitespeed.io/throttle": "6.0.1",
|
|
15
15
|
"chrome-har": "1.3.1",
|
|
16
16
|
"chrome-remote-interface": "0.34.0",
|
|
17
17
|
"execa": "9.6.1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"typescript": "5.9.3"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
|
-
"node": ">=
|
|
43
|
+
"node": ">=22.0.0"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
46
|
"CHANGELOG.md",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"url": "https://github.com/sitespeedio/browsertime.git"
|
|
93
93
|
},
|
|
94
94
|
"homepage": "https://www.sitespeed.io/documentation/browsertime/",
|
|
95
|
-
"license": "
|
|
95
|
+
"license": "Apache-2.0",
|
|
96
96
|
"ava": {
|
|
97
97
|
"files": [
|
|
98
98
|
"test/**/*",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function isResourceLoaderBundle(url: any, source: any): any;
|
|
2
|
+
export function labelForUrl(url: any): string;
|
|
3
|
+
export function labelForStyleAttributes(attributes: any): any;
|
|
4
|
+
export function resourceLoaderLocationResolver(source: any): {
|
|
5
|
+
resolve(lineNumber: any, columnNumber: any): {
|
|
6
|
+
name: any;
|
|
7
|
+
version: any;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export function resourceLoaderModuleCoverage(source: any, painted: any): any;
|
|
11
|
+
//# sourceMappingURL=mediawikiResourceLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediawikiResourceLoader.d.ts","sourceRoot":"","sources":["../../lib/chrome/mediawikiResourceLoader.js"],"names":[],"mappings":"AAmBA,mEAEC;AA6DD,8CAyBC;AAcD,8DAUC;AAwBD;;;;;EAkCC;AAOD,6EA4BC"}
|
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
export function parseCPUTrace(tracelog: any, url: any): Promise<{
|
|
2
|
-
categories: {
|
|
3
|
-
parseHTML: number;
|
|
4
|
-
styleLayout: number;
|
|
5
|
-
paintCompositeRender: number;
|
|
6
|
-
scriptParseCompile: number;
|
|
7
|
-
scriptEvaluation: number;
|
|
8
|
-
garbageCollection: number;
|
|
9
|
-
other: number;
|
|
10
|
-
};
|
|
11
|
-
events: {};
|
|
12
|
-
urls: {
|
|
13
|
-
url: string;
|
|
14
|
-
value: number;
|
|
15
|
-
}[];
|
|
16
|
-
scriptCosts: any[];
|
|
17
|
-
forcedReflows: any[];
|
|
18
|
-
nonCompositedAnimations: any[];
|
|
19
|
-
} | {
|
|
20
|
-
categories?: undefined;
|
|
21
|
-
events?: undefined;
|
|
22
|
-
urls?: undefined;
|
|
23
|
-
scriptCosts?: undefined;
|
|
24
|
-
forcedReflows?: undefined;
|
|
25
|
-
nonCompositedAnimations?: undefined;
|
|
26
|
-
}>;
|
|
1
|
+
export function parseCPUTrace(tracelog: any, url: any): Promise<{}>;
|
|
27
2
|
//# sourceMappingURL=parseCpuTrace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseCpuTrace.d.ts","sourceRoot":"","sources":["../../lib/chrome/parseCpuTrace.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parseCpuTrace.d.ts","sourceRoot":"","sources":["../../lib/chrome/parseCpuTrace.js"],"names":[],"mappings":"AAoCA,oEA8KC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocking-time.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/blocking-time.js"],"names":[],"mappings":"AAqJA;;;;;EAuCC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function computeDomainBreakdown(trace: any, pageUrl: any): {
|
|
2
|
+
firstPartyDomain: any;
|
|
3
|
+
firstParty: number;
|
|
4
|
+
thirdParty: number;
|
|
5
|
+
domains: {
|
|
6
|
+
domain: any;
|
|
7
|
+
value: number;
|
|
8
|
+
firstParty: boolean;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=domain-breakdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain-breakdown.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/domain-breakdown.js"],"names":[],"mappings":"AAmDA;;;;;;;;;EAkCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame-stability.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/frame-stability.js"],"names":[],"mappings":"AAwDA;;;;;;;;;EA8EC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-costs.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/function-costs.js"],"names":[],"mappings":"AAyFA;;;;IA+LC"}
|
|
@@ -16,4 +16,11 @@ export function computeMainThreadTasks(trace: any, options?: {
|
|
|
16
16
|
export { computeScriptCosts } from "./script-costs.js";
|
|
17
17
|
export { computeForcedReflows } from "./forced-reflows.js";
|
|
18
18
|
export { computeNonCompositedAnimations } from "./non-composited-animations.js";
|
|
19
|
+
export { computeFrameStability } from "./frame-stability.js";
|
|
20
|
+
export { computeFunctionCosts } from "./function-costs.js";
|
|
21
|
+
export { computeStyleInvalidations } from "./style-invalidations.js";
|
|
22
|
+
export { computeSelectorStats } from "./selector-stats.js";
|
|
23
|
+
export { computeTimerCosts } from "./timer-costs.js";
|
|
24
|
+
export { computeBlockingTime } from "./blocking-time.js";
|
|
25
|
+
export { computeDomainBreakdown } from "./domain-breakdown.js";
|
|
19
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/index.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;GAWG;AACH,6DAJG;IAA0B,OAAO,GAAzB,OAAO;CAEf,GAAU,KAAK,KAAQ,CAYzB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Object} trace Parsed Chrome trace.json (with .traceEvents).
|
|
3
|
+
* @param {Map<string, {resolve: Function}>} bundles Bundle URL →
|
|
4
|
+
* location resolver, built while collecting coverage.
|
|
5
|
+
* @returns {Array<{url:string,
|
|
6
|
+
* modules:Array<{name:string, version:string, selfTime:number}>,
|
|
7
|
+
* otherTime:number}>}
|
|
8
|
+
*/
|
|
9
|
+
export function computeModuleCosts(trace: any, bundles: Map<string, {
|
|
10
|
+
resolve: Function;
|
|
11
|
+
}>): Array<{
|
|
12
|
+
url: string;
|
|
13
|
+
modules: Array<{
|
|
14
|
+
name: string;
|
|
15
|
+
version: string;
|
|
16
|
+
selfTime: number;
|
|
17
|
+
}>;
|
|
18
|
+
otherTime: number;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=module-costs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-costs.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/module-costs.js"],"names":[],"mappings":"AAqFA;;;;;;;GAOG;AACH,wDANW,GAAG,CAAC,MAAM,EAAE;IAAC,OAAO,WAAU;CAAC,CAAC,GAE9B,KAAK,CAAC;IAAC,GAAG,EAAC,MAAM,CAAC;IAC1B,OAAO,EAAC,KAAK,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,QAAQ,EAAC,MAAM,CAAA;KAAC,CAAC,CAAC;IAC9D,SAAS,EAAC,MAAM,CAAA;CAAC,CAAC,CA6CtB"}
|
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Non-composited animations — animations that triggered Layout or
|
|
3
|
-
* Paint instead of running entirely on the compositor thread.
|
|
4
|
-
*
|
|
5
|
-
* Compositor-only animations (transform, opacity) hand off to the
|
|
6
|
-
* GPU and don't block the main thread. Anything that touches
|
|
7
|
-
* `top` / `left` / `width` / `box-shadow` / non-transformable
|
|
8
|
-
* filters / etc. forces a per-frame layout or paint, which means
|
|
9
|
-
* jank on busy main threads.
|
|
10
|
-
*
|
|
11
|
-
* Chrome marks these in the trace via `Animation` events whose
|
|
12
|
-
* `args.data.compositeFailed` bitmask is non-zero, plus a list of
|
|
13
|
-
* `unsupportedProperties` strings. We surface the raw values; the
|
|
14
|
-
* consumer can map the bitmask to human reasons (see Lighthouse's
|
|
15
|
-
* non-composited-animations audit for the canonical mapping).
|
|
16
|
-
*
|
|
17
|
-
* Returns: [{ name, id, compositeFailed, unsupportedProperties,
|
|
18
|
-
* startTime }, …]
|
|
19
|
-
* name — args.data.nodeName when present (rare)
|
|
20
|
-
* id — args.data.id (compositor-internal)
|
|
21
|
-
* compositeFailed — bitmask of failure reasons
|
|
22
|
-
* unsupportedProperties — array of property names that blocked
|
|
23
|
-
* composite (e.g. ['top','box-shadow'])
|
|
24
|
-
* startTime — event ts in microseconds (raw trace timestamp)
|
|
25
|
-
*/
|
|
26
1
|
export function computeNonCompositedAnimations(trace: any): {
|
|
27
2
|
name: any;
|
|
28
3
|
id: any;
|
|
29
4
|
compositeFailed: any;
|
|
5
|
+
failureReasons: string[];
|
|
30
6
|
unsupportedProperties: any;
|
|
31
7
|
startTime: any;
|
|
32
8
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"non-composited-animations.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/non-composited-animations.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"non-composited-animations.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/non-composited-animations.js"],"names":[],"mappings":"AAsEA;;;;;;;IA6BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector-stats.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/selector-stats.js"],"names":[],"mappings":"AAwCA;;;;;;EAqEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-invalidations.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/style-invalidations.js"],"names":[],"mappings":"AAqFA;;;;;;;EA4EC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-groups.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/task-groups.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"task-groups.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/task-groups.js"],"names":[],"mappings":"AAgNA;;;;;;GAMG;AACH,8CAMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AApBD,iCAAkC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timer-costs.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/timer-costs.js"],"names":[],"mappings":"AAqDA;;;;;;;;EAiIC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traceUtilities.d.ts","sourceRoot":"","sources":["../../../lib/chrome/webdriver/traceUtilities.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"traceUtilities.d.ts","sourceRoot":"","sources":["../../../lib/chrome/webdriver/traceUtilities.js"],"names":[],"mappings":"AAwEA;;;;;;GAoCC"}
|