browsertime 27.0.4 → 27.2.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/lib/chrome/parseCpuTrace.js +38 -2
  3. package/lib/chrome/trace/forced-reflows.js +78 -0
  4. package/lib/chrome/trace/index.js +41 -0
  5. package/lib/chrome/trace/main-thread-tasks.js +196 -0
  6. package/lib/chrome/trace/non-composited-animations.js +55 -0
  7. package/lib/chrome/trace/script-costs.js +88 -0
  8. package/lib/chrome/trace/task-groups.js +196 -0
  9. package/lib/chrome/trace/trace-of-tab.js +168 -0
  10. package/lib/chrome/trace/tracing-processor.js +95 -0
  11. package/lib/chrome/webdriver/chromium.js +13 -0
  12. package/lib/support/har/index.js +22 -0
  13. package/package.json +3 -4
  14. package/types/chrome/parseCpuTrace.d.ts +6 -0
  15. package/types/chrome/parseCpuTrace.d.ts.map +1 -1
  16. package/types/chrome/trace/forced-reflows.d.ts +8 -0
  17. package/types/chrome/trace/forced-reflows.d.ts.map +1 -0
  18. package/types/chrome/trace/index.d.ts +19 -0
  19. package/types/chrome/trace/index.d.ts.map +1 -0
  20. package/types/chrome/trace/main-thread-tasks.d.ts +31 -0
  21. package/types/chrome/trace/main-thread-tasks.d.ts.map +1 -0
  22. package/types/chrome/trace/non-composited-animations.d.ts +33 -0
  23. package/types/chrome/trace/non-composited-animations.d.ts.map +1 -0
  24. package/types/chrome/trace/script-costs.d.ts +14 -0
  25. package/types/chrome/trace/script-costs.d.ts.map +1 -0
  26. package/types/chrome/trace/task-groups.d.ts +65 -0
  27. package/types/chrome/trace/task-groups.d.ts.map +1 -0
  28. package/types/chrome/trace/trace-of-tab.d.ts +32 -0
  29. package/types/chrome/trace/trace-of-tab.d.ts.map +1 -0
  30. package/types/chrome/trace/tracing-processor.d.ts +24 -0
  31. package/types/chrome/trace/tracing-processor.d.ts.map +1 -0
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @param {Object} trace Parsed Chrome trace.json (with .traceEvents).
3
+ * @returns {Array<{url:string, parse:number, compile:number,
4
+ * execute:number, total:number}>}
5
+ * Per-URL JS cost in ms, sorted by total desc.
6
+ */
7
+ export function computeScriptCosts(trace: any): Array<{
8
+ url: string;
9
+ parse: number;
10
+ compile: number;
11
+ execute: number;
12
+ total: number;
13
+ }>;
14
+ //# sourceMappingURL=script-costs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-costs.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/script-costs.js"],"names":[],"mappings":"AA6CA;;;;;GAKG;AACH,gDAJa,KAAK,CAAC;IAAC,GAAG,EAAC,MAAM,CAAC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAC,OAAO,EAAC,MAAM,CAAC;IACzC,OAAO,EAAC,MAAM,CAAC;IAAC,KAAK,EAAC,MAAM,CAAA;CAAC,CAAC,CAuCjD"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Look up the group for a trace event by name. Falls through to
3
+ * prefix matching for event-name families that share a structural
4
+ * pattern (`V8.GC*` for any V8 GC phase) so we don't have to
5
+ * enumerate every phase name Chrome ships. Returns undefined when
6
+ * no group matches; callers should fall back to `taskGroups.other`.
7
+ */
8
+ export function groupForEvent(name: any): any;
9
+ export namespace taskGroups {
10
+ namespace parseHTML {
11
+ let id: string;
12
+ let label: string;
13
+ let traceEventNames: string[];
14
+ }
15
+ namespace styleLayout {
16
+ let id_1: string;
17
+ export { id_1 as id };
18
+ let label_1: string;
19
+ export { label_1 as label };
20
+ let traceEventNames_1: string[];
21
+ export { traceEventNames_1 as traceEventNames };
22
+ }
23
+ namespace paintCompositeRender {
24
+ let id_2: string;
25
+ export { id_2 as id };
26
+ let label_2: string;
27
+ export { label_2 as label };
28
+ let traceEventNames_2: string[];
29
+ export { traceEventNames_2 as traceEventNames };
30
+ }
31
+ namespace scriptParseCompile {
32
+ let id_3: string;
33
+ export { id_3 as id };
34
+ let label_3: string;
35
+ export { label_3 as label };
36
+ let traceEventNames_3: string[];
37
+ export { traceEventNames_3 as traceEventNames };
38
+ }
39
+ namespace scriptEvaluation {
40
+ let id_4: string;
41
+ export { id_4 as id };
42
+ let label_4: string;
43
+ export { label_4 as label };
44
+ let traceEventNames_4: string[];
45
+ export { traceEventNames_4 as traceEventNames };
46
+ }
47
+ namespace garbageCollection {
48
+ let id_5: string;
49
+ export { id_5 as id };
50
+ let label_5: string;
51
+ export { label_5 as label };
52
+ let traceEventNames_5: string[];
53
+ export { traceEventNames_5 as traceEventNames };
54
+ }
55
+ namespace other {
56
+ let id_6: string;
57
+ export { id_6 as id };
58
+ let label_6: string;
59
+ export { label_6 as label };
60
+ let traceEventNames_6: string[];
61
+ export { traceEventNames_6 as traceEventNames };
62
+ }
63
+ }
64
+ export const taskNameToGroup: {};
65
+ //# sourceMappingURL=task-groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-groups.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/task-groups.js"],"names":[],"mappings":"AAsLA;;;;;;GAMG;AACH,8CAMC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AApBD,iCAAkC"}
@@ -0,0 +1,32 @@
1
+ export function computeTraceOfTab(trace: any): {
2
+ timings: {
3
+ navigationStart: number;
4
+ firstPaint: number;
5
+ firstMeaningfulPaint: number;
6
+ traceEnd: number;
7
+ load: number;
8
+ domContentLoaded: number;
9
+ };
10
+ timestamps: {
11
+ navigationStart: any;
12
+ firstPaint: any;
13
+ firstMeaningfulPaint: any;
14
+ traceEnd: any;
15
+ load: any;
16
+ domContentLoaded: any;
17
+ };
18
+ processEvents: any[];
19
+ mainThreadEvents: any[];
20
+ mainFrameIds: {
21
+ pid: any;
22
+ tid: any;
23
+ frameId: any;
24
+ };
25
+ navigationStartEvt: any;
26
+ firstPaintEvt: any;
27
+ firstMeaningfulPaintEvt: any;
28
+ loadEvt: any;
29
+ domContentLoadedEvt: any;
30
+ fmpFellBack: boolean;
31
+ };
32
+ //# sourceMappingURL=trace-of-tab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace-of-tab.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/trace-of-tab.js"],"names":[],"mappings":"AAqDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkHC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Trace pid/tid/frameId resolver, ported from @sitespeed.io/tracium
3
+ * 0.3.3 (Lighthouse 2018 lineage). Only `findMainFrameIds` is kept —
4
+ * the original module also exposed `getRiskToResponsiveness` and
5
+ * the `_riskPercentiles` math used by Lighthouse's TBT, but those
6
+ * aren't called from Browsertime's pipeline so they're dropped to
7
+ * keep the surface tight.
8
+ */
9
+ /**
10
+ * Locate the main renderer's pid/tid/frameId via three fallbacks, in
11
+ * order of how recent the trace events are: the modern
12
+ * TracingStartedInBrowser event (with a frames[] payload), the legacy
13
+ * TracingStartedInPage event, and finally pairing the first
14
+ * navigationStart with the first ResourceSendRequest. Throws when
15
+ * none of the three apply — which means the trace doesn't contain
16
+ * a renderable tab and the caller (parseCpuTrace) will degrade
17
+ * gracefully via its outer try/catch.
18
+ */
19
+ export function findMainFrameIds(events: any): {
20
+ pid: any;
21
+ tid: any;
22
+ frameId: any;
23
+ };
24
+ //# sourceMappingURL=tracing-processor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing-processor.d.ts","sourceRoot":"","sources":["../../../lib/chrome/trace/tracing-processor.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;GASG;AACH;;;;EA2EC"}