@paulirish/trace_engine 0.0.4 → 0.0.5
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/09-06/meta.json +989 -0
- package/09-06/trace.mjs +5681 -0
- package/09-06/trace.mjs.map +7 -0
- package/README.md +3 -0
- package/meta.json +85 -50
- package/package.json +1 -1
- package/trace.mjs +535 -366
- package/trace.mjs.map +3 -3
package/trace.mjs
CHANGED
|
@@ -17,6 +17,7 @@ var handlers_exports = {};
|
|
|
17
17
|
__export(handlers_exports, {
|
|
18
18
|
Migration: () => Migration_exports,
|
|
19
19
|
ModelHandlers: () => ModelHandlers_exports,
|
|
20
|
+
Threads: () => Threads_exports,
|
|
20
21
|
Types: () => types_exports2
|
|
21
22
|
});
|
|
22
23
|
|
|
@@ -385,7 +386,8 @@ __export(types_exports, {
|
|
|
385
386
|
// front_end/models/trace/types/Configuration.ts
|
|
386
387
|
var Configuration_exports = {};
|
|
387
388
|
__export(Configuration_exports, {
|
|
388
|
-
DEFAULT: () => DEFAULT
|
|
389
|
+
DEFAULT: () => DEFAULT,
|
|
390
|
+
configToCacheKey: () => configToCacheKey
|
|
389
391
|
});
|
|
390
392
|
var DEFAULT = {
|
|
391
393
|
settings: {},
|
|
@@ -398,6 +400,12 @@ var DEFAULT = {
|
|
|
398
400
|
pauseDuration: 1
|
|
399
401
|
}
|
|
400
402
|
};
|
|
403
|
+
function configToCacheKey(config2) {
|
|
404
|
+
return [
|
|
405
|
+
`experiments.timelineShowAllEvents:${config2.experiments.timelineShowAllEvents}`,
|
|
406
|
+
`experiments.timelineV8RuntimeCallStats:${config2.experiments.timelineV8RuntimeCallStats}`
|
|
407
|
+
].join("-");
|
|
408
|
+
}
|
|
401
409
|
|
|
402
410
|
// front_end/models/trace/types/File.ts
|
|
403
411
|
var File_exports = {};
|
|
@@ -459,6 +467,7 @@ __export(TraceEvents_exports, {
|
|
|
459
467
|
isSyntheticInteractionEvent: () => isSyntheticInteractionEvent,
|
|
460
468
|
isSyntheticLayoutShift: () => isSyntheticLayoutShift,
|
|
461
469
|
isSyntheticNetworkRequestDetailsEvent: () => isSyntheticNetworkRequestDetailsEvent,
|
|
470
|
+
isSyntheticTraceEventCpuProfile: () => isSyntheticTraceEventCpuProfile,
|
|
462
471
|
isSyntheticUserTimingTraceEvent: () => isSyntheticUserTimingTraceEvent,
|
|
463
472
|
isThreadName: () => isThreadName,
|
|
464
473
|
isTraceEventAnimation: () => isTraceEventAnimation,
|
|
@@ -712,6 +721,9 @@ function isTraceEventGPUTask(traceEventData) {
|
|
|
712
721
|
function isTraceEventProfile(traceEventData) {
|
|
713
722
|
return traceEventData.name === "Profile";
|
|
714
723
|
}
|
|
724
|
+
function isSyntheticTraceEventCpuProfile(traceEventData) {
|
|
725
|
+
return traceEventData.name === "CpuProfile";
|
|
726
|
+
}
|
|
715
727
|
function isTraceEventProfileChunk(traceEventData) {
|
|
716
728
|
return traceEventData.name === "ProfileChunk";
|
|
717
729
|
}
|
|
@@ -1051,25 +1063,138 @@ function data() {
|
|
|
1051
1063
|
};
|
|
1052
1064
|
}
|
|
1053
1065
|
|
|
1066
|
+
// front_end/models/trace/handlers/AuctionWorkletsHandler.ts
|
|
1067
|
+
var AuctionWorkletsHandler_exports = {};
|
|
1068
|
+
__export(AuctionWorkletsHandler_exports, {
|
|
1069
|
+
data: () => data2,
|
|
1070
|
+
finalize: () => finalize2,
|
|
1071
|
+
handleEvent: () => handleEvent2,
|
|
1072
|
+
reset: () => reset2
|
|
1073
|
+
});
|
|
1074
|
+
var runningInProcessEvents = /* @__PURE__ */ new Map();
|
|
1075
|
+
var doneWithProcessEvents = /* @__PURE__ */ new Map();
|
|
1076
|
+
var createdSyntheticEvents = /* @__PURE__ */ new Map();
|
|
1077
|
+
var utilityThreads = /* @__PURE__ */ new Map();
|
|
1078
|
+
var v8HelperThreads = /* @__PURE__ */ new Map();
|
|
1079
|
+
function reset2() {
|
|
1080
|
+
runningInProcessEvents.clear();
|
|
1081
|
+
doneWithProcessEvents.clear();
|
|
1082
|
+
createdSyntheticEvents.clear();
|
|
1083
|
+
utilityThreads.clear();
|
|
1084
|
+
v8HelperThreads.clear();
|
|
1085
|
+
}
|
|
1086
|
+
function handleEvent2(event) {
|
|
1087
|
+
if (TraceEvents_exports.isTraceEventAuctionWorkletRunningInProcess(event)) {
|
|
1088
|
+
runningInProcessEvents.set(event.args.data.pid, event);
|
|
1089
|
+
return;
|
|
1090
|
+
}
|
|
1091
|
+
if (TraceEvents_exports.isTraceEventAuctionWorkletDoneWithProcess(event)) {
|
|
1092
|
+
doneWithProcessEvents.set(event.args.data.pid, event);
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
if (TraceEvents_exports.isThreadName(event)) {
|
|
1096
|
+
if (event.args.name === "auction_worklet.CrUtilityMain") {
|
|
1097
|
+
utilityThreads.set(event.pid, event);
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1100
|
+
if (event.args.name === "AuctionV8HelperThread") {
|
|
1101
|
+
v8HelperThreads.set(event.pid, event);
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
function workletType(input) {
|
|
1106
|
+
switch (input) {
|
|
1107
|
+
case "seller":
|
|
1108
|
+
return TraceEvents_exports.AuctionWorkletType.SELLER;
|
|
1109
|
+
case "bidder":
|
|
1110
|
+
return TraceEvents_exports.AuctionWorkletType.BIDDER;
|
|
1111
|
+
default:
|
|
1112
|
+
return TraceEvents_exports.AuctionWorkletType.UNKNOWN;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
function makeSyntheticEventBase(event) {
|
|
1116
|
+
return {
|
|
1117
|
+
name: "SyntheticAuctionWorkletEvent",
|
|
1118
|
+
s: TraceEvents_exports.TraceEventScope.THREAD,
|
|
1119
|
+
cat: event.cat,
|
|
1120
|
+
tid: event.tid,
|
|
1121
|
+
ts: event.ts,
|
|
1122
|
+
ph: TraceEvents_exports.Phase.INSTANT,
|
|
1123
|
+
pid: event.args.data.pid,
|
|
1124
|
+
host: event.args.data.host,
|
|
1125
|
+
target: event.args.data.target,
|
|
1126
|
+
type: workletType(event.args.data.type)
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
async function finalize2() {
|
|
1130
|
+
for (const [pid, utilityThreadNameEvent] of utilityThreads) {
|
|
1131
|
+
const v8HelperEvent = v8HelperThreads.get(pid);
|
|
1132
|
+
if (!v8HelperEvent) {
|
|
1133
|
+
continue;
|
|
1134
|
+
}
|
|
1135
|
+
const runningEvent = runningInProcessEvents.get(pid);
|
|
1136
|
+
const doneWithEvent = doneWithProcessEvents.get(pid);
|
|
1137
|
+
let syntheticEvent = null;
|
|
1138
|
+
if (runningEvent) {
|
|
1139
|
+
syntheticEvent = {
|
|
1140
|
+
...makeSyntheticEventBase(runningEvent),
|
|
1141
|
+
args: {
|
|
1142
|
+
data: {
|
|
1143
|
+
runningInProcessEvent: runningEvent,
|
|
1144
|
+
utilityThread: utilityThreadNameEvent,
|
|
1145
|
+
v8HelperThread: v8HelperEvent
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
};
|
|
1149
|
+
if (doneWithEvent) {
|
|
1150
|
+
syntheticEvent.args.data.doneWithProcessEvent = doneWithEvent;
|
|
1151
|
+
}
|
|
1152
|
+
} else if (doneWithEvent) {
|
|
1153
|
+
syntheticEvent = {
|
|
1154
|
+
...makeSyntheticEventBase(doneWithEvent),
|
|
1155
|
+
args: {
|
|
1156
|
+
data: {
|
|
1157
|
+
doneWithProcessEvent: doneWithEvent,
|
|
1158
|
+
utilityThread: utilityThreadNameEvent,
|
|
1159
|
+
v8HelperThread: v8HelperEvent
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
if (runningEvent) {
|
|
1164
|
+
syntheticEvent.args.data.runningInProcessEvent = runningEvent;
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
if (syntheticEvent === null) {
|
|
1168
|
+
continue;
|
|
1169
|
+
}
|
|
1170
|
+
createdSyntheticEvents.set(pid, syntheticEvent);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
function data2() {
|
|
1174
|
+
return {
|
|
1175
|
+
worklets: new Map(createdSyntheticEvents)
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1054
1179
|
// front_end/models/trace/handlers/GPUHandler.ts
|
|
1055
1180
|
var GPUHandler_exports = {};
|
|
1056
1181
|
__export(GPUHandler_exports, {
|
|
1057
|
-
data: () =>
|
|
1182
|
+
data: () => data4,
|
|
1058
1183
|
deps: () => deps,
|
|
1059
|
-
finalize: () =>
|
|
1060
|
-
handleEvent: () =>
|
|
1184
|
+
finalize: () => finalize4,
|
|
1185
|
+
handleEvent: () => handleEvent4,
|
|
1061
1186
|
initialize: () => initialize2,
|
|
1062
|
-
reset: () =>
|
|
1187
|
+
reset: () => reset4
|
|
1063
1188
|
});
|
|
1064
1189
|
|
|
1065
1190
|
// front_end/models/trace/handlers/MetaHandler.ts
|
|
1066
1191
|
var MetaHandler_exports = {};
|
|
1067
1192
|
__export(MetaHandler_exports, {
|
|
1068
|
-
data: () =>
|
|
1069
|
-
finalize: () =>
|
|
1070
|
-
handleEvent: () =>
|
|
1193
|
+
data: () => data3,
|
|
1194
|
+
finalize: () => finalize3,
|
|
1195
|
+
handleEvent: () => handleEvent3,
|
|
1071
1196
|
initialize: () => initialize,
|
|
1072
|
-
reset: () =>
|
|
1197
|
+
reset: () => reset3
|
|
1073
1198
|
});
|
|
1074
1199
|
var rendererProcessesByFrameId = /* @__PURE__ */ new Map();
|
|
1075
1200
|
var mainFrameId = "";
|
|
@@ -1098,7 +1223,7 @@ var eventPhasesOfInterestForTraceBounds = /* @__PURE__ */ new Set([
|
|
|
1098
1223
|
TraceEvents_exports.Phase.INSTANT
|
|
1099
1224
|
]);
|
|
1100
1225
|
var handlerState2 = 1 /* UNINITIALIZED */;
|
|
1101
|
-
function
|
|
1226
|
+
function reset3() {
|
|
1102
1227
|
navigationsByFrameId.clear();
|
|
1103
1228
|
navigationsByNavigationId.clear();
|
|
1104
1229
|
mainFrameNavigations.length = 0;
|
|
@@ -1143,7 +1268,7 @@ function updateRendererProcessByFrame(event, frame) {
|
|
|
1143
1268
|
}
|
|
1144
1269
|
});
|
|
1145
1270
|
}
|
|
1146
|
-
function
|
|
1271
|
+
function handleEvent3(event) {
|
|
1147
1272
|
if (handlerState2 !== 2 /* INITIALIZED */) {
|
|
1148
1273
|
throw new Error("Meta Handler is not initialized");
|
|
1149
1274
|
}
|
|
@@ -1233,7 +1358,7 @@ function handleEvent2(event) {
|
|
|
1233
1358
|
return;
|
|
1234
1359
|
}
|
|
1235
1360
|
}
|
|
1236
|
-
async function
|
|
1361
|
+
async function finalize3() {
|
|
1237
1362
|
if (handlerState2 !== 2 /* INITIALIZED */) {
|
|
1238
1363
|
throw new Error("Handler is not initialized");
|
|
1239
1364
|
}
|
|
@@ -1269,7 +1394,7 @@ async function finalize2() {
|
|
|
1269
1394
|
}
|
|
1270
1395
|
handlerState2 = 3 /* FINALIZED */;
|
|
1271
1396
|
}
|
|
1272
|
-
function
|
|
1397
|
+
function data3() {
|
|
1273
1398
|
if (handlerState2 !== 3 /* FINALIZED */) {
|
|
1274
1399
|
throw new Error("Meta Handler is not finalized");
|
|
1275
1400
|
}
|
|
@@ -1297,7 +1422,8 @@ var helpers_exports = {};
|
|
|
1297
1422
|
__export(helpers_exports, {
|
|
1298
1423
|
SamplesIntegrator: () => SamplesIntegrator_exports,
|
|
1299
1424
|
Timing: () => Timing_exports3,
|
|
1300
|
-
Trace: () => Trace_exports
|
|
1425
|
+
Trace: () => Trace_exports,
|
|
1426
|
+
TreeHelpers: () => TreeHelpers_exports
|
|
1301
1427
|
});
|
|
1302
1428
|
|
|
1303
1429
|
// front_end/models/trace/helpers/SamplesIntegrator.ts
|
|
@@ -1320,7 +1446,9 @@ __export(Timing_exports3, {
|
|
|
1320
1446
|
secondsToMicroseconds: () => secondsToMicroseconds,
|
|
1321
1447
|
secondsToMilliseconds: () => secondsToMilliseconds,
|
|
1322
1448
|
timeStampForEventAdjustedByClosestNavigation: () => timeStampForEventAdjustedByClosestNavigation,
|
|
1323
|
-
|
|
1449
|
+
traceWindowFromMilliSeconds: () => traceWindowFromMilliSeconds,
|
|
1450
|
+
traceWindowMilliSeconds: () => traceWindowMilliSeconds,
|
|
1451
|
+
traceWindowMillisecondsToMicroSeconds: () => traceWindowMillisecondsToMicroSeconds
|
|
1324
1452
|
});
|
|
1325
1453
|
|
|
1326
1454
|
// front_end/models/trace/helpers/Trace.ts
|
|
@@ -1331,6 +1459,7 @@ __export(Trace_exports, {
|
|
|
1331
1459
|
extractId: () => extractId,
|
|
1332
1460
|
extractOriginFromTrace: () => extractOriginFromTrace,
|
|
1333
1461
|
getNavigationForTraceEvent: () => getNavigationForTraceEvent,
|
|
1462
|
+
makeProfileCall: () => makeProfileCall,
|
|
1334
1463
|
mergeEventsInOrder: () => mergeEventsInOrder,
|
|
1335
1464
|
sortTraceEventsInPlace: () => sortTraceEventsInPlace
|
|
1336
1465
|
});
|
|
@@ -1436,6 +1565,21 @@ function activeURLForFrameAtTime(frameId, time, rendererProcessesByFrame) {
|
|
|
1436
1565
|
}
|
|
1437
1566
|
return null;
|
|
1438
1567
|
}
|
|
1568
|
+
function makeProfileCall(node, ts, pid, tid) {
|
|
1569
|
+
return {
|
|
1570
|
+
cat: "",
|
|
1571
|
+
name: "ProfileCall",
|
|
1572
|
+
nodeId: node.id,
|
|
1573
|
+
args: {},
|
|
1574
|
+
ph: TraceEvents_exports.Phase.COMPLETE,
|
|
1575
|
+
pid,
|
|
1576
|
+
tid,
|
|
1577
|
+
ts,
|
|
1578
|
+
dur: Timing_exports2.MicroSeconds(0),
|
|
1579
|
+
selfTime: Timing_exports2.MicroSeconds(0),
|
|
1580
|
+
callFrame: node.callFrame
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1439
1583
|
|
|
1440
1584
|
// front_end/models/trace/helpers/Timing.ts
|
|
1441
1585
|
var millisecondsToMicroseconds = (value) => Timing_exports2.MicroSeconds(value * 1e3);
|
|
@@ -1545,13 +1689,28 @@ function eventTimingsSeconds(event) {
|
|
|
1545
1689
|
selfTime: microSecondsToSeconds(microTimes.selfTime)
|
|
1546
1690
|
};
|
|
1547
1691
|
}
|
|
1548
|
-
function
|
|
1692
|
+
function traceWindowMilliSeconds(bounds) {
|
|
1549
1693
|
return {
|
|
1550
1694
|
min: microSecondsToMilliseconds(bounds.min),
|
|
1551
1695
|
max: microSecondsToMilliseconds(bounds.max),
|
|
1552
1696
|
range: microSecondsToMilliseconds(bounds.range)
|
|
1553
1697
|
};
|
|
1554
1698
|
}
|
|
1699
|
+
function traceWindowMillisecondsToMicroSeconds(bounds) {
|
|
1700
|
+
return {
|
|
1701
|
+
min: millisecondsToMicroseconds(bounds.min),
|
|
1702
|
+
max: millisecondsToMicroseconds(bounds.max),
|
|
1703
|
+
range: millisecondsToMicroseconds(bounds.range)
|
|
1704
|
+
};
|
|
1705
|
+
}
|
|
1706
|
+
function traceWindowFromMilliSeconds(min, max) {
|
|
1707
|
+
const traceWindow = {
|
|
1708
|
+
min: millisecondsToMicroseconds(min),
|
|
1709
|
+
max: millisecondsToMicroseconds(max),
|
|
1710
|
+
range: millisecondsToMicroseconds(Timing_exports2.MilliSeconds(max - min))
|
|
1711
|
+
};
|
|
1712
|
+
return traceWindow;
|
|
1713
|
+
}
|
|
1555
1714
|
|
|
1556
1715
|
// front_end/models/trace/helpers/SamplesIntegrator.ts
|
|
1557
1716
|
var SamplesIntegrator = class {
|
|
@@ -1562,6 +1721,7 @@ var SamplesIntegrator = class {
|
|
|
1562
1721
|
#lockedJsStackDepth = [];
|
|
1563
1722
|
#fakeJSInvocation = false;
|
|
1564
1723
|
#profileModel;
|
|
1724
|
+
#nodeForGC = /* @__PURE__ */ new Map();
|
|
1565
1725
|
#engineConfig;
|
|
1566
1726
|
constructor(profileModel, pid, tid, configuration) {
|
|
1567
1727
|
this.#profileModel = profileModel;
|
|
@@ -1650,26 +1810,39 @@ var SamplesIntegrator = class {
|
|
|
1650
1810
|
return [];
|
|
1651
1811
|
}
|
|
1652
1812
|
const calls = [];
|
|
1813
|
+
let prevNode;
|
|
1653
1814
|
for (let i = 0; i < samples.length; i++) {
|
|
1654
1815
|
const node = this.#profileModel.nodeByIndex(i);
|
|
1655
1816
|
const timestamp = millisecondsToMicroseconds(Timing_exports2.MilliSeconds(timestamps[i]));
|
|
1656
1817
|
if (!node) {
|
|
1657
1818
|
continue;
|
|
1658
1819
|
}
|
|
1659
|
-
const call =
|
|
1820
|
+
const call = makeProfileCall(node, timestamp, this.#processId, this.#threadId);
|
|
1660
1821
|
calls.push(call);
|
|
1822
|
+
if (node.id === this.#profileModel.gcNode?.id && prevNode) {
|
|
1823
|
+
this.#nodeForGC.set(call, prevNode);
|
|
1824
|
+
continue;
|
|
1825
|
+
}
|
|
1826
|
+
prevNode = node;
|
|
1661
1827
|
}
|
|
1662
1828
|
return calls;
|
|
1663
1829
|
}
|
|
1664
1830
|
#getStackTraceFromProfileCall(profileCall) {
|
|
1665
1831
|
let node = this.#profileModel.nodeById(profileCall.nodeId);
|
|
1832
|
+
const isGarbageCollection = Boolean(node?.id === this.#profileModel.gcNode?.id);
|
|
1833
|
+
if (isGarbageCollection) {
|
|
1834
|
+
node = this.#nodeForGC.get(profileCall) || null;
|
|
1835
|
+
}
|
|
1666
1836
|
if (!node) {
|
|
1667
1837
|
return [];
|
|
1668
1838
|
}
|
|
1669
|
-
const callFrames = new Array(node.depth + 1);
|
|
1839
|
+
const callFrames = new Array(node.depth + 1 + Number(isGarbageCollection));
|
|
1670
1840
|
let i = callFrames.length - 1;
|
|
1841
|
+
if (isGarbageCollection) {
|
|
1842
|
+
callFrames[i--] = profileCall;
|
|
1843
|
+
}
|
|
1671
1844
|
while (node) {
|
|
1672
|
-
callFrames[i--] =
|
|
1845
|
+
callFrames[i--] = makeProfileCall(node, profileCall.ts, this.#processId, this.#threadId);
|
|
1673
1846
|
node = node.parent;
|
|
1674
1847
|
}
|
|
1675
1848
|
return callFrames;
|
|
@@ -1691,10 +1864,10 @@ var SamplesIntegrator = class {
|
|
|
1691
1864
|
this.#truncateJSStack(i, event.ts);
|
|
1692
1865
|
for (; i < stackTrace.length; ++i) {
|
|
1693
1866
|
const call = stackTrace[i];
|
|
1694
|
-
this.#currentJSStack.push(call);
|
|
1695
1867
|
if (call.nodeId === this.#profileModel.programNode?.id || call.nodeId === this.#profileModel.root?.id || call.nodeId === this.#profileModel.idleNode?.id || call.nodeId === this.#profileModel.gcNode?.id) {
|
|
1696
1868
|
continue;
|
|
1697
1869
|
}
|
|
1870
|
+
this.#currentJSStack.push(call);
|
|
1698
1871
|
this.#constructedProfileCalls.push(call);
|
|
1699
1872
|
}
|
|
1700
1873
|
}
|
|
@@ -1770,28 +1943,121 @@ var SamplesIntegrator = class {
|
|
|
1770
1943
|
}
|
|
1771
1944
|
stack.length = j;
|
|
1772
1945
|
}
|
|
1773
|
-
static makeProfileCall(node, ts, pid, tid) {
|
|
1774
|
-
return {
|
|
1775
|
-
cat: "",
|
|
1776
|
-
name: "ProfileCall",
|
|
1777
|
-
nodeId: node.id,
|
|
1778
|
-
args: {},
|
|
1779
|
-
ph: TraceEvents_exports.Phase.COMPLETE,
|
|
1780
|
-
pid,
|
|
1781
|
-
tid,
|
|
1782
|
-
ts,
|
|
1783
|
-
dur: Timing_exports2.MicroSeconds(0),
|
|
1784
|
-
selfTime: Timing_exports2.MicroSeconds(0),
|
|
1785
|
-
callFrame: node.callFrame
|
|
1786
|
-
};
|
|
1787
|
-
}
|
|
1788
1946
|
};
|
|
1789
1947
|
|
|
1948
|
+
// front_end/models/trace/helpers/TreeHelpers.ts
|
|
1949
|
+
var TreeHelpers_exports = {};
|
|
1950
|
+
__export(TreeHelpers_exports, {
|
|
1951
|
+
makeEmptyTraceEntryNode: () => makeEmptyTraceEntryNode,
|
|
1952
|
+
makeEmptyTraceEntryTree: () => makeEmptyTraceEntryTree,
|
|
1953
|
+
makeTraceEntryNodeId: () => makeTraceEntryNodeId,
|
|
1954
|
+
treify: () => treify,
|
|
1955
|
+
walkEntireTree: () => walkEntireTree,
|
|
1956
|
+
walkTreeFromEntry: () => walkTreeFromEntry
|
|
1957
|
+
});
|
|
1958
|
+
var nodeIdCount = 0;
|
|
1959
|
+
var makeTraceEntryNodeId = () => ++nodeIdCount;
|
|
1960
|
+
var makeEmptyTraceEntryTree = () => ({
|
|
1961
|
+
nodes: /* @__PURE__ */ new Map(),
|
|
1962
|
+
roots: /* @__PURE__ */ new Set(),
|
|
1963
|
+
maxDepth: 0
|
|
1964
|
+
});
|
|
1965
|
+
var makeEmptyTraceEntryNode = (entry, id) => ({
|
|
1966
|
+
entry,
|
|
1967
|
+
id,
|
|
1968
|
+
parentId: null,
|
|
1969
|
+
children: /* @__PURE__ */ new Set(),
|
|
1970
|
+
depth: 0
|
|
1971
|
+
});
|
|
1972
|
+
var TraceEntryNodeIdTag = class {
|
|
1973
|
+
#tag;
|
|
1974
|
+
};
|
|
1975
|
+
function treify(entries, options) {
|
|
1976
|
+
const entryToNode3 = /* @__PURE__ */ new Map();
|
|
1977
|
+
const stack = [];
|
|
1978
|
+
nodeIdCount = -1;
|
|
1979
|
+
const tree = makeEmptyTraceEntryTree();
|
|
1980
|
+
for (let i = 0; i < entries.length; i++) {
|
|
1981
|
+
const event = entries[i];
|
|
1982
|
+
if (options && !options.filter.has(event.name)) {
|
|
1983
|
+
continue;
|
|
1984
|
+
}
|
|
1985
|
+
const duration = event.dur || 0;
|
|
1986
|
+
const nodeId = makeTraceEntryNodeId();
|
|
1987
|
+
const node = makeEmptyTraceEntryNode(event, nodeId);
|
|
1988
|
+
if (stack.length === 0) {
|
|
1989
|
+
tree.nodes.set(nodeId, node);
|
|
1990
|
+
tree.roots.add(node);
|
|
1991
|
+
event.selfTime = Timing_exports2.MicroSeconds(duration);
|
|
1992
|
+
stack.push(node);
|
|
1993
|
+
tree.maxDepth = Math.max(tree.maxDepth, stack.length);
|
|
1994
|
+
entryToNode3.set(event, node);
|
|
1995
|
+
continue;
|
|
1996
|
+
}
|
|
1997
|
+
const parentNode = stack.at(-1);
|
|
1998
|
+
if (parentNode === void 0) {
|
|
1999
|
+
throw new Error("Impossible: no parent node found in the stack");
|
|
2000
|
+
}
|
|
2001
|
+
const parentEvent = parentNode.entry;
|
|
2002
|
+
const begin = event.ts;
|
|
2003
|
+
const parentBegin = parentEvent.ts;
|
|
2004
|
+
const parentDuration = parentEvent.dur || 0;
|
|
2005
|
+
const end = begin + duration;
|
|
2006
|
+
const parentEnd = parentBegin + parentDuration;
|
|
2007
|
+
const startsBeforeParent = begin < parentBegin;
|
|
2008
|
+
if (startsBeforeParent) {
|
|
2009
|
+
throw new Error("Impossible: current event starts before the parent event");
|
|
2010
|
+
}
|
|
2011
|
+
const startsAfterParent = begin >= parentEnd;
|
|
2012
|
+
if (startsAfterParent) {
|
|
2013
|
+
stack.pop();
|
|
2014
|
+
i--;
|
|
2015
|
+
nodeIdCount--;
|
|
2016
|
+
continue;
|
|
2017
|
+
}
|
|
2018
|
+
const endsAfterParent = end > parentEnd;
|
|
2019
|
+
if (endsAfterParent) {
|
|
2020
|
+
continue;
|
|
2021
|
+
}
|
|
2022
|
+
tree.nodes.set(nodeId, node);
|
|
2023
|
+
node.depth = stack.length;
|
|
2024
|
+
node.parentId = parentNode.id;
|
|
2025
|
+
parentNode.children.add(node);
|
|
2026
|
+
event.selfTime = Timing_exports2.MicroSeconds(duration);
|
|
2027
|
+
if (parentEvent.selfTime !== void 0) {
|
|
2028
|
+
parentEvent.selfTime = Timing_exports2.MicroSeconds(parentEvent.selfTime - (event.dur || 0));
|
|
2029
|
+
}
|
|
2030
|
+
stack.push(node);
|
|
2031
|
+
tree.maxDepth = Math.max(tree.maxDepth, stack.length);
|
|
2032
|
+
entryToNode3.set(event, node);
|
|
2033
|
+
}
|
|
2034
|
+
return { tree, entryToNode: entryToNode3 };
|
|
2035
|
+
}
|
|
2036
|
+
function walkTreeFromEntry(entryToNode3, rootEntry, onEntryStart, onEntryEnd) {
|
|
2037
|
+
const startNode = entryToNode3.get(rootEntry);
|
|
2038
|
+
if (!startNode) {
|
|
2039
|
+
return;
|
|
2040
|
+
}
|
|
2041
|
+
walkTreeByNode(entryToNode3, startNode, onEntryStart, onEntryEnd);
|
|
2042
|
+
}
|
|
2043
|
+
function walkEntireTree(entryToNode3, tree, onEntryStart, onEntryEnd) {
|
|
2044
|
+
for (const rootNode of tree.roots) {
|
|
2045
|
+
walkTreeByNode(entryToNode3, rootNode, onEntryStart, onEntryEnd);
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
function walkTreeByNode(entryToNode3, rootNode, onEntryStart, onEntryEnd) {
|
|
2049
|
+
onEntryStart(rootNode.entry);
|
|
2050
|
+
for (const child of rootNode.children) {
|
|
2051
|
+
walkTreeByNode(entryToNode3, child, onEntryStart, onEntryEnd);
|
|
2052
|
+
}
|
|
2053
|
+
onEntryEnd(rootNode.entry);
|
|
2054
|
+
}
|
|
2055
|
+
|
|
1790
2056
|
// front_end/models/trace/handlers/GPUHandler.ts
|
|
1791
2057
|
var handlerState3 = 1 /* UNINITIALIZED */;
|
|
1792
2058
|
var eventsInProcessThread = /* @__PURE__ */ new Map();
|
|
1793
2059
|
var mainGPUThreadTasks = [];
|
|
1794
|
-
function
|
|
2060
|
+
function reset4() {
|
|
1795
2061
|
eventsInProcessThread.clear();
|
|
1796
2062
|
mainGPUThreadTasks = [];
|
|
1797
2063
|
handlerState3 = 1 /* UNINITIALIZED */;
|
|
@@ -1802,7 +2068,7 @@ function initialize2() {
|
|
|
1802
2068
|
}
|
|
1803
2069
|
handlerState3 = 2 /* INITIALIZED */;
|
|
1804
2070
|
}
|
|
1805
|
-
function
|
|
2071
|
+
function handleEvent4(event) {
|
|
1806
2072
|
if (handlerState3 !== 2 /* INITIALIZED */) {
|
|
1807
2073
|
throw new Error("GPU Handler is not initialized");
|
|
1808
2074
|
}
|
|
@@ -1811,18 +2077,18 @@ function handleEvent3(event) {
|
|
|
1811
2077
|
}
|
|
1812
2078
|
Trace_exports.addEventToProcessThread(event, eventsInProcessThread);
|
|
1813
2079
|
}
|
|
1814
|
-
async function
|
|
2080
|
+
async function finalize4() {
|
|
1815
2081
|
if (handlerState3 !== 2 /* INITIALIZED */) {
|
|
1816
2082
|
throw new Error("GPU Handler is not initialized");
|
|
1817
2083
|
}
|
|
1818
|
-
const { gpuProcessId: gpuProcessId2, gpuThreadId: gpuThreadId2 } =
|
|
2084
|
+
const { gpuProcessId: gpuProcessId2, gpuThreadId: gpuThreadId2 } = data3();
|
|
1819
2085
|
const gpuThreadsForProcess = eventsInProcessThread.get(gpuProcessId2);
|
|
1820
2086
|
if (gpuThreadsForProcess && gpuThreadId2) {
|
|
1821
2087
|
mainGPUThreadTasks = gpuThreadsForProcess.get(gpuThreadId2) || [];
|
|
1822
2088
|
}
|
|
1823
2089
|
handlerState3 = 3 /* FINALIZED */;
|
|
1824
2090
|
}
|
|
1825
|
-
function
|
|
2091
|
+
function data4() {
|
|
1826
2092
|
if (handlerState3 !== 3 /* FINALIZED */) {
|
|
1827
2093
|
throw new Error("GPU Handler is not finalized");
|
|
1828
2094
|
}
|
|
@@ -1840,13 +2106,13 @@ __export(LayoutShiftsHandler_exports, {
|
|
|
1840
2106
|
LayoutShiftsThreshold: () => LayoutShiftsThreshold,
|
|
1841
2107
|
MAX_CLUSTER_DURATION: () => MAX_CLUSTER_DURATION,
|
|
1842
2108
|
MAX_SHIFT_TIME_DELTA: () => MAX_SHIFT_TIME_DELTA,
|
|
1843
|
-
data: () =>
|
|
2109
|
+
data: () => data7,
|
|
1844
2110
|
deps: () => deps4,
|
|
1845
|
-
finalize: () =>
|
|
2111
|
+
finalize: () => finalize7,
|
|
1846
2112
|
findNextScreenshotEventIndex: () => findNextScreenshotEventIndex,
|
|
1847
|
-
handleEvent: () =>
|
|
2113
|
+
handleEvent: () => handleEvent7,
|
|
1848
2114
|
initialize: () => initialize3,
|
|
1849
|
-
reset: () =>
|
|
2115
|
+
reset: () => reset7,
|
|
1850
2116
|
stateForLayoutShiftScore: () => stateForLayoutShiftScore
|
|
1851
2117
|
});
|
|
1852
2118
|
|
|
@@ -1856,14 +2122,14 @@ __export(PageLoadMetricsHandler_exports, {
|
|
|
1856
2122
|
MarkerName: () => MarkerName,
|
|
1857
2123
|
MetricName: () => MetricName,
|
|
1858
2124
|
ScoreClassification: () => ScoreClassification,
|
|
1859
|
-
data: () =>
|
|
2125
|
+
data: () => data5,
|
|
1860
2126
|
deps: () => deps2,
|
|
1861
2127
|
eventIsPageLoadEvent: () => eventIsPageLoadEvent,
|
|
1862
|
-
finalize: () =>
|
|
2128
|
+
finalize: () => finalize5,
|
|
1863
2129
|
getFrameIdForPageLoadEvent: () => getFrameIdForPageLoadEvent,
|
|
1864
|
-
handleEvent: () =>
|
|
2130
|
+
handleEvent: () => handleEvent5,
|
|
1865
2131
|
isTraceEventMarkerEvent: () => isTraceEventMarkerEvent,
|
|
1866
|
-
reset: () =>
|
|
2132
|
+
reset: () => reset5,
|
|
1867
2133
|
scoreClassificationForDOMContentLoaded: () => scoreClassificationForDOMContentLoaded,
|
|
1868
2134
|
scoreClassificationForFirstContentfulPaint: () => scoreClassificationForFirstContentfulPaint,
|
|
1869
2135
|
scoreClassificationForLargestContentfulPaint: () => scoreClassificationForLargestContentfulPaint,
|
|
@@ -1872,7 +2138,7 @@ __export(PageLoadMetricsHandler_exports, {
|
|
|
1872
2138
|
});
|
|
1873
2139
|
var metricScoresByFrameId = /* @__PURE__ */ new Map();
|
|
1874
2140
|
var allMarkerEvents = [];
|
|
1875
|
-
function
|
|
2141
|
+
function reset5() {
|
|
1876
2142
|
metricScoresByFrameId.clear();
|
|
1877
2143
|
pageLoadEventsArray = [];
|
|
1878
2144
|
allMarkerEvents = [];
|
|
@@ -1899,7 +2165,7 @@ var pageLoadEventTypeGuards = [
|
|
|
1899
2165
|
function eventIsPageLoadEvent(event) {
|
|
1900
2166
|
return pageLoadEventTypeGuards.some((fn) => fn(event));
|
|
1901
2167
|
}
|
|
1902
|
-
function
|
|
2168
|
+
function handleEvent5(event) {
|
|
1903
2169
|
if (!eventIsPageLoadEvent(event)) {
|
|
1904
2170
|
return;
|
|
1905
2171
|
}
|
|
@@ -1911,7 +2177,7 @@ function storePageLoadMetricAgainstNavigationId(navigation, event) {
|
|
|
1911
2177
|
throw new Error("Navigation event unexpectedly had no navigation ID.");
|
|
1912
2178
|
}
|
|
1913
2179
|
const frameId = getFrameIdForPageLoadEvent(event);
|
|
1914
|
-
const { rendererProcessesByFrame } =
|
|
2180
|
+
const { rendererProcessesByFrame } = data3();
|
|
1915
2181
|
const rendererProcessesInFrame = rendererProcessesByFrame.get(frameId);
|
|
1916
2182
|
if (!rendererProcessesInFrame) {
|
|
1917
2183
|
return;
|
|
@@ -1923,12 +2189,6 @@ function storePageLoadMetricAgainstNavigationId(navigation, event) {
|
|
|
1923
2189
|
if (TraceEvents_exports.isTraceEventNavigationStart(event)) {
|
|
1924
2190
|
return;
|
|
1925
2191
|
}
|
|
1926
|
-
const minTime = processData[0].window.min;
|
|
1927
|
-
const maxTime = processData.at(-1)?.window.max || 0;
|
|
1928
|
-
const eventBelongsToProcess = event.ts >= minTime && event.ts <= maxTime;
|
|
1929
|
-
if (!eventBelongsToProcess) {
|
|
1930
|
-
return;
|
|
1931
|
-
}
|
|
1932
2192
|
if (TraceEvents_exports.isTraceEventFirstContentfulPaint(event)) {
|
|
1933
2193
|
const fcpTime = Timing_exports2.MicroSeconds(event.ts - navigation.ts);
|
|
1934
2194
|
const score = Timing_exports3.formatMicrosecondsTime(fcpTime, {
|
|
@@ -2082,7 +2342,7 @@ function getNavigationForPageLoadEvent(event) {
|
|
|
2082
2342
|
if (!navigationId) {
|
|
2083
2343
|
throw new Error("Trace event unexpectedly had no navigation ID.");
|
|
2084
2344
|
}
|
|
2085
|
-
const { navigationsByNavigationId: navigationsByNavigationId2 } =
|
|
2345
|
+
const { navigationsByNavigationId: navigationsByNavigationId2 } = data3();
|
|
2086
2346
|
const navigation = navigationsByNavigationId2.get(navigationId);
|
|
2087
2347
|
if (!navigation) {
|
|
2088
2348
|
return null;
|
|
@@ -2091,7 +2351,7 @@ function getNavigationForPageLoadEvent(event) {
|
|
|
2091
2351
|
}
|
|
2092
2352
|
if (TraceEvents_exports.isTraceEventMarkDOMContent(event) || TraceEvents_exports.isTraceEventInteractiveTime(event) || TraceEvents_exports.isTraceEventLayoutShift(event) || TraceEvents_exports.isTraceEventMarkLoad(event)) {
|
|
2093
2353
|
const frameId = getFrameIdForPageLoadEvent(event);
|
|
2094
|
-
const { navigationsByFrameId: navigationsByFrameId2 } =
|
|
2354
|
+
const { navigationsByFrameId: navigationsByFrameId2 } = data3();
|
|
2095
2355
|
return Trace_exports.getNavigationForTraceEvent(event, frameId, navigationsByFrameId2);
|
|
2096
2356
|
}
|
|
2097
2357
|
if (TraceEvents_exports.isTraceEventNavigationStart(event)) {
|
|
@@ -2164,7 +2424,7 @@ function gatherFinalLCPEvents() {
|
|
|
2164
2424
|
}
|
|
2165
2425
|
return allFinalLCPEvents;
|
|
2166
2426
|
}
|
|
2167
|
-
async function
|
|
2427
|
+
async function finalize5() {
|
|
2168
2428
|
pageLoadEventsArray.sort((a, b) => a.ts - b.ts);
|
|
2169
2429
|
for (const pageLoadEvent of pageLoadEventsArray) {
|
|
2170
2430
|
const navigation = getNavigationForPageLoadEvent(pageLoadEvent);
|
|
@@ -2173,12 +2433,12 @@ async function finalize4() {
|
|
|
2173
2433
|
}
|
|
2174
2434
|
}
|
|
2175
2435
|
const allFinalLCPEvents = gatherFinalLCPEvents();
|
|
2176
|
-
const mainFrame =
|
|
2436
|
+
const mainFrame = data3().mainFrameId;
|
|
2177
2437
|
const allEventsButLCP = pageLoadEventsArray.filter((event) => !TraceEvents_exports.isTraceEventLargestContentfulPaintCandidate(event));
|
|
2178
2438
|
const markerEvents = [...allFinalLCPEvents, ...allEventsButLCP].filter(isTraceEventMarkerEvent);
|
|
2179
2439
|
allMarkerEvents = markerEvents.filter((event) => getFrameIdForPageLoadEvent(event) === mainFrame).sort((a, b) => a.ts - b.ts);
|
|
2180
2440
|
}
|
|
2181
|
-
function
|
|
2441
|
+
function data5() {
|
|
2182
2442
|
return {
|
|
2183
2443
|
metricScoresByFrameId: new Map(metricScoresByFrameId),
|
|
2184
2444
|
allMarkerEvents: [...allMarkerEvents]
|
|
@@ -2209,32 +2469,32 @@ var MetricName = /* @__PURE__ */ ((MetricName2) => {
|
|
|
2209
2469
|
// front_end/models/trace/handlers/ScreenshotsHandler.ts
|
|
2210
2470
|
var ScreenshotsHandler_exports = {};
|
|
2211
2471
|
__export(ScreenshotsHandler_exports, {
|
|
2212
|
-
data: () =>
|
|
2472
|
+
data: () => data6,
|
|
2213
2473
|
deps: () => deps3,
|
|
2214
|
-
finalize: () =>
|
|
2215
|
-
handleEvent: () =>
|
|
2216
|
-
reset: () =>
|
|
2474
|
+
finalize: () => finalize6,
|
|
2475
|
+
handleEvent: () => handleEvent6,
|
|
2476
|
+
reset: () => reset6
|
|
2217
2477
|
});
|
|
2218
2478
|
var eventsInProcessThread2 = /* @__PURE__ */ new Map();
|
|
2219
2479
|
var snapshots = [];
|
|
2220
|
-
function
|
|
2480
|
+
function reset6() {
|
|
2221
2481
|
eventsInProcessThread2.clear();
|
|
2222
2482
|
snapshots.length = 0;
|
|
2223
2483
|
}
|
|
2224
|
-
function
|
|
2225
|
-
if (event.
|
|
2484
|
+
function handleEvent6(event) {
|
|
2485
|
+
if (event.name !== "Screenshot") {
|
|
2226
2486
|
return;
|
|
2227
2487
|
}
|
|
2228
2488
|
Trace_exports.addEventToProcessThread(event, eventsInProcessThread2);
|
|
2229
2489
|
}
|
|
2230
|
-
async function
|
|
2231
|
-
const { browserProcessId: browserProcessId2, browserThreadId: browserThreadId2 } =
|
|
2490
|
+
async function finalize6() {
|
|
2491
|
+
const { browserProcessId: browserProcessId2, browserThreadId: browserThreadId2 } = data3();
|
|
2232
2492
|
const browserThreads = eventsInProcessThread2.get(browserProcessId2);
|
|
2233
2493
|
if (browserThreads) {
|
|
2234
2494
|
snapshots = browserThreads.get(browserThreadId2) || [];
|
|
2235
2495
|
}
|
|
2236
2496
|
}
|
|
2237
|
-
function
|
|
2497
|
+
function data6() {
|
|
2238
2498
|
return [...snapshots];
|
|
2239
2499
|
}
|
|
2240
2500
|
function deps3() {
|
|
@@ -2259,7 +2519,7 @@ function initialize3() {
|
|
|
2259
2519
|
}
|
|
2260
2520
|
handlerState4 = 2 /* INITIALIZED */;
|
|
2261
2521
|
}
|
|
2262
|
-
function
|
|
2522
|
+
function reset7() {
|
|
2263
2523
|
handlerState4 = 1 /* UNINITIALIZED */;
|
|
2264
2524
|
layoutShiftEvents.length = 0;
|
|
2265
2525
|
layoutInvalidationEvents.length = 0;
|
|
@@ -2269,7 +2529,7 @@ function reset6() {
|
|
|
2269
2529
|
scoreRecords.length = 0;
|
|
2270
2530
|
clsWindowID = -1;
|
|
2271
2531
|
}
|
|
2272
|
-
function
|
|
2532
|
+
function handleEvent7(event) {
|
|
2273
2533
|
if (handlerState4 !== 2 /* INITIALIZED */) {
|
|
2274
2534
|
throw new Error("Handler is not initialized");
|
|
2275
2535
|
}
|
|
@@ -2301,7 +2561,7 @@ function updateTraceWindowMax(traceWindow, newMax) {
|
|
|
2301
2561
|
traceWindow.range = Timing_exports2.MicroSeconds(traceWindow.max - traceWindow.min);
|
|
2302
2562
|
}
|
|
2303
2563
|
function findNextScreenshotSource(timestamp) {
|
|
2304
|
-
const screenshots =
|
|
2564
|
+
const screenshots = data6();
|
|
2305
2565
|
const screenshotIndex = findNextScreenshotEventIndex(screenshots, timestamp);
|
|
2306
2566
|
if (!screenshotIndex) {
|
|
2307
2567
|
return void 0;
|
|
@@ -2312,7 +2572,7 @@ function findNextScreenshotEventIndex(screenshots, timestamp) {
|
|
|
2312
2572
|
return array_utilities_exports.nearestIndexFromBeginning(screenshots, (frame) => frame.ts > timestamp);
|
|
2313
2573
|
}
|
|
2314
2574
|
function buildScoreRecords() {
|
|
2315
|
-
const { traceBounds: traceBounds2 } =
|
|
2575
|
+
const { traceBounds: traceBounds2 } = data3();
|
|
2316
2576
|
scoreRecords.push({ ts: traceBounds2.min, score: 0 });
|
|
2317
2577
|
for (const cluster of clusters) {
|
|
2318
2578
|
let clusterScore = 0;
|
|
@@ -2330,7 +2590,7 @@ function buildScoreRecords() {
|
|
|
2330
2590
|
scoreRecords.push({ ts: cluster.clusterWindow.max, score: 0 });
|
|
2331
2591
|
}
|
|
2332
2592
|
}
|
|
2333
|
-
async function
|
|
2593
|
+
async function finalize7() {
|
|
2334
2594
|
layoutShiftEvents.sort((a, b) => a.ts - b.ts);
|
|
2335
2595
|
prePaintEvents.sort((a, b) => a.ts - b.ts);
|
|
2336
2596
|
layoutInvalidationEvents.sort((a, b) => a.ts - b.ts);
|
|
@@ -2339,7 +2599,7 @@ async function finalize6() {
|
|
|
2339
2599
|
handlerState4 = 3 /* FINALIZED */;
|
|
2340
2600
|
}
|
|
2341
2601
|
async function buildLayoutShiftsClusters() {
|
|
2342
|
-
const { navigationsByFrameId: navigationsByFrameId2, mainFrameId: mainFrameId2, traceBounds: traceBounds2 } =
|
|
2602
|
+
const { navigationsByFrameId: navigationsByFrameId2, mainFrameId: mainFrameId2, traceBounds: traceBounds2 } = data3();
|
|
2343
2603
|
const navigations = navigationsByFrameId2.get(mainFrameId2) || [];
|
|
2344
2604
|
if (layoutShiftEvents.length === 0) {
|
|
2345
2605
|
return;
|
|
@@ -2450,7 +2710,7 @@ async function buildLayoutShiftsClusters() {
|
|
|
2450
2710
|
}
|
|
2451
2711
|
}
|
|
2452
2712
|
}
|
|
2453
|
-
function
|
|
2713
|
+
function data7() {
|
|
2454
2714
|
if (handlerState4 !== 3 /* FINALIZED */) {
|
|
2455
2715
|
throw new Error("Layout Shifts Handler is not finalized");
|
|
2456
2716
|
}
|
|
@@ -2487,34 +2747,34 @@ var LayoutShiftsThreshold = /* @__PURE__ */ ((LayoutShiftsThreshold2) => {
|
|
|
2487
2747
|
// front_end/models/trace/handlers/MemoryHandler.ts
|
|
2488
2748
|
var MemoryHandler_exports = {};
|
|
2489
2749
|
__export(MemoryHandler_exports, {
|
|
2490
|
-
data: () =>
|
|
2491
|
-
handleEvent: () =>
|
|
2492
|
-
reset: () =>
|
|
2750
|
+
data: () => data8,
|
|
2751
|
+
handleEvent: () => handleEvent8,
|
|
2752
|
+
reset: () => reset8
|
|
2493
2753
|
});
|
|
2494
2754
|
var updateCountersByProcess = /* @__PURE__ */ new Map();
|
|
2495
|
-
function
|
|
2755
|
+
function reset8() {
|
|
2496
2756
|
updateCountersByProcess.clear();
|
|
2497
2757
|
}
|
|
2498
|
-
function
|
|
2758
|
+
function handleEvent8(event) {
|
|
2499
2759
|
if (TraceEvents_exports.isTraceEventUpdateCounters(event)) {
|
|
2500
2760
|
const countersForProcess = map_utilities_exports.getWithDefault(updateCountersByProcess, event.pid, () => []);
|
|
2501
2761
|
countersForProcess.push(event);
|
|
2502
2762
|
updateCountersByProcess.set(event.pid, countersForProcess);
|
|
2503
2763
|
}
|
|
2504
2764
|
}
|
|
2505
|
-
function
|
|
2765
|
+
function data8() {
|
|
2506
2766
|
return { updateCountersByProcess: new Map(updateCountersByProcess) };
|
|
2507
2767
|
}
|
|
2508
2768
|
|
|
2509
2769
|
// front_end/models/trace/handlers/NetworkRequestsHandler.ts
|
|
2510
2770
|
var NetworkRequestsHandler_exports = {};
|
|
2511
2771
|
__export(NetworkRequestsHandler_exports, {
|
|
2512
|
-
data: () =>
|
|
2772
|
+
data: () => data9,
|
|
2513
2773
|
deps: () => deps5,
|
|
2514
|
-
finalize: () =>
|
|
2515
|
-
handleEvent: () =>
|
|
2774
|
+
finalize: () => finalize8,
|
|
2775
|
+
handleEvent: () => handleEvent9,
|
|
2516
2776
|
initialize: () => initialize4,
|
|
2517
|
-
reset: () =>
|
|
2777
|
+
reset: () => reset9
|
|
2518
2778
|
});
|
|
2519
2779
|
var MILLISECONDS_TO_MICROSECONDS = 1e3;
|
|
2520
2780
|
var SECONDS_TO_MICROSECONDS = 1e6;
|
|
@@ -2546,7 +2806,7 @@ function firstPositiveValueInList(entries) {
|
|
|
2546
2806
|
return 0;
|
|
2547
2807
|
}
|
|
2548
2808
|
var handlerState5 = 1 /* UNINITIALIZED */;
|
|
2549
|
-
function
|
|
2809
|
+
function reset9() {
|
|
2550
2810
|
requestsByOrigin.clear();
|
|
2551
2811
|
requestMap.clear();
|
|
2552
2812
|
requestsByTime.length = 0;
|
|
@@ -2555,7 +2815,7 @@ function reset8() {
|
|
|
2555
2815
|
function initialize4() {
|
|
2556
2816
|
handlerState5 = 2 /* INITIALIZED */;
|
|
2557
2817
|
}
|
|
2558
|
-
function
|
|
2818
|
+
function handleEvent9(event) {
|
|
2559
2819
|
if (handlerState5 !== 2 /* INITIALIZED */) {
|
|
2560
2820
|
throw new Error("Network Request handler is not initialized");
|
|
2561
2821
|
}
|
|
@@ -2588,11 +2848,11 @@ function handleEvent8(event) {
|
|
|
2588
2848
|
return;
|
|
2589
2849
|
}
|
|
2590
2850
|
}
|
|
2591
|
-
async function
|
|
2851
|
+
async function finalize8() {
|
|
2592
2852
|
if (handlerState5 !== 2 /* INITIALIZED */) {
|
|
2593
2853
|
throw new Error("Network Request handler is not initialized");
|
|
2594
2854
|
}
|
|
2595
|
-
const { rendererProcessesByFrame } =
|
|
2855
|
+
const { rendererProcessesByFrame } = data3();
|
|
2596
2856
|
for (const [requestId, request] of requestMap.entries()) {
|
|
2597
2857
|
if (!request.sendRequests || !request.receiveResponse) {
|
|
2598
2858
|
continue;
|
|
@@ -2735,7 +2995,7 @@ async function finalize7() {
|
|
|
2735
2995
|
}
|
|
2736
2996
|
handlerState5 = 3 /* FINALIZED */;
|
|
2737
2997
|
}
|
|
2738
|
-
function
|
|
2998
|
+
function data9() {
|
|
2739
2999
|
if (handlerState5 !== 3 /* FINALIZED */) {
|
|
2740
3000
|
throw new Error("Network Request handler is not finalized");
|
|
2741
3001
|
}
|
|
@@ -2753,11 +3013,11 @@ var UserInteractionsHandler_exports = {};
|
|
|
2753
3013
|
__export(UserInteractionsHandler_exports, {
|
|
2754
3014
|
LONG_INTERACTION_THRESHOLD: () => LONG_INTERACTION_THRESHOLD,
|
|
2755
3015
|
categoryOfInteraction: () => categoryOfInteraction,
|
|
2756
|
-
data: () =>
|
|
2757
|
-
finalize: () =>
|
|
2758
|
-
handleEvent: () =>
|
|
3016
|
+
data: () => data10,
|
|
3017
|
+
finalize: () => finalize9,
|
|
3018
|
+
handleEvent: () => handleEvent10,
|
|
2759
3019
|
removeNestedInteractions: () => removeNestedInteractions,
|
|
2760
|
-
reset: () =>
|
|
3020
|
+
reset: () => reset10
|
|
2761
3021
|
});
|
|
2762
3022
|
var allEvents = [];
|
|
2763
3023
|
var LONG_INTERACTION_THRESHOLD = Timing_exports3.millisecondsToMicroseconds(Timing_exports2.MilliSeconds(200));
|
|
@@ -2767,7 +3027,7 @@ var interactionEventsWithNoNesting = [];
|
|
|
2767
3027
|
var eventTimingEndEventsById = /* @__PURE__ */ new Map();
|
|
2768
3028
|
var eventTimingStartEventsForInteractions = [];
|
|
2769
3029
|
var handlerState6 = 1 /* UNINITIALIZED */;
|
|
2770
|
-
function
|
|
3030
|
+
function reset10() {
|
|
2771
3031
|
allEvents.length = 0;
|
|
2772
3032
|
interactionEvents.length = 0;
|
|
2773
3033
|
eventTimingStartEventsForInteractions.length = 0;
|
|
@@ -2776,7 +3036,7 @@ function reset9() {
|
|
|
2776
3036
|
longestInteractionEvent = null;
|
|
2777
3037
|
handlerState6 = 2 /* INITIALIZED */;
|
|
2778
3038
|
}
|
|
2779
|
-
function
|
|
3039
|
+
function handleEvent10(event) {
|
|
2780
3040
|
if (handlerState6 !== 2 /* INITIALIZED */) {
|
|
2781
3041
|
throw new Error("Handler is not initialized");
|
|
2782
3042
|
}
|
|
@@ -2847,7 +3107,7 @@ function removeNestedInteractions(interactions) {
|
|
|
2847
3107
|
});
|
|
2848
3108
|
return keptEvents;
|
|
2849
3109
|
}
|
|
2850
|
-
async function
|
|
3110
|
+
async function finalize9() {
|
|
2851
3111
|
for (const interactionStartEvent of eventTimingStartEventsForInteractions) {
|
|
2852
3112
|
const endEvent = eventTimingEndEventsById.get(interactionStartEvent.id);
|
|
2853
3113
|
if (!endEvent) {
|
|
@@ -2881,7 +3141,7 @@ async function finalize8() {
|
|
|
2881
3141
|
handlerState6 = 3 /* FINALIZED */;
|
|
2882
3142
|
interactionEventsWithNoNesting.push(...removeNestedInteractions(interactionEvents));
|
|
2883
3143
|
}
|
|
2884
|
-
function
|
|
3144
|
+
function data10() {
|
|
2885
3145
|
return {
|
|
2886
3146
|
allEvents: [...allEvents],
|
|
2887
3147
|
interactionEvents: [...interactionEvents],
|
|
@@ -2896,10 +3156,10 @@ function data9() {
|
|
|
2896
3156
|
// front_end/models/trace/handlers/UserTimingsHandler.ts
|
|
2897
3157
|
var UserTimingsHandler_exports = {};
|
|
2898
3158
|
__export(UserTimingsHandler_exports, {
|
|
2899
|
-
data: () =>
|
|
2900
|
-
finalize: () =>
|
|
2901
|
-
handleEvent: () =>
|
|
2902
|
-
reset: () =>
|
|
3159
|
+
data: () => data11,
|
|
3160
|
+
finalize: () => finalize10,
|
|
3161
|
+
handleEvent: () => handleEvent11,
|
|
3162
|
+
reset: () => reset11
|
|
2903
3163
|
});
|
|
2904
3164
|
var syntheticEvents = [];
|
|
2905
3165
|
var performanceMeasureEvents = [];
|
|
@@ -2907,7 +3167,7 @@ var performanceMarkEvents = [];
|
|
|
2907
3167
|
var consoleTimings = [];
|
|
2908
3168
|
var timestampEvents = [];
|
|
2909
3169
|
var handlerState7 = 1 /* UNINITIALIZED */;
|
|
2910
|
-
function
|
|
3170
|
+
function reset11() {
|
|
2911
3171
|
syntheticEvents.length = 0;
|
|
2912
3172
|
performanceMeasureEvents.length = 0;
|
|
2913
3173
|
performanceMarkEvents.length = 0;
|
|
@@ -2953,7 +3213,7 @@ var navTimingNames = [
|
|
|
2953
3213
|
"loadEventStart",
|
|
2954
3214
|
"loadEventEnd"
|
|
2955
3215
|
];
|
|
2956
|
-
function
|
|
3216
|
+
function handleEvent11(event) {
|
|
2957
3217
|
if (handlerState7 !== 2 /* INITIALIZED */) {
|
|
2958
3218
|
throw new Error("UserTimings handler is not initialized");
|
|
2959
3219
|
}
|
|
@@ -2975,7 +3235,7 @@ function handleEvent10(event) {
|
|
|
2975
3235
|
timestampEvents.push(event);
|
|
2976
3236
|
}
|
|
2977
3237
|
}
|
|
2978
|
-
async function
|
|
3238
|
+
async function finalize10() {
|
|
2979
3239
|
if (handlerState7 !== 2 /* INITIALIZED */) {
|
|
2980
3240
|
throw new Error("UserTimings handler is not initialized");
|
|
2981
3241
|
}
|
|
@@ -3025,7 +3285,7 @@ async function finalize9() {
|
|
|
3025
3285
|
syntheticEvents.sort((a, b) => a.ts - b.ts);
|
|
3026
3286
|
handlerState7 = 3 /* FINALIZED */;
|
|
3027
3287
|
}
|
|
3028
|
-
function
|
|
3288
|
+
function data11() {
|
|
3029
3289
|
if (handlerState7 !== 3 /* FINALIZED */) {
|
|
3030
3290
|
throw new Error("UserTimings handler is not finalized");
|
|
3031
3291
|
}
|
|
@@ -3042,15 +3302,15 @@ var WarningsHandler_exports = {};
|
|
|
3042
3302
|
__export(WarningsHandler_exports, {
|
|
3043
3303
|
FORCED_LAYOUT_AND_STYLES_THRESHOLD: () => FORCED_LAYOUT_AND_STYLES_THRESHOLD,
|
|
3044
3304
|
LONG_MAIN_THREAD_TASK_THRESHOLD: () => LONG_MAIN_THREAD_TASK_THRESHOLD,
|
|
3045
|
-
data: () =>
|
|
3046
|
-
handleEvent: () =>
|
|
3047
|
-
reset: () =>
|
|
3305
|
+
data: () => data12,
|
|
3306
|
+
handleEvent: () => handleEvent12,
|
|
3307
|
+
reset: () => reset12
|
|
3048
3308
|
});
|
|
3049
3309
|
var warningsPerEvent = /* @__PURE__ */ new Map();
|
|
3050
3310
|
var eventsPerWarning = /* @__PURE__ */ new Map();
|
|
3051
3311
|
var FORCED_LAYOUT_AND_STYLES_THRESHOLD = Timing_exports3.millisecondsToMicroseconds(Timing_exports2.MilliSeconds(10));
|
|
3052
3312
|
var LONG_MAIN_THREAD_TASK_THRESHOLD = Timing_exports3.millisecondsToMicroseconds(Timing_exports2.MilliSeconds(50));
|
|
3053
|
-
function
|
|
3313
|
+
function reset12() {
|
|
3054
3314
|
warningsPerEvent.clear();
|
|
3055
3315
|
eventsPerWarning.clear();
|
|
3056
3316
|
}
|
|
@@ -3062,7 +3322,7 @@ function storeWarning(event, warning) {
|
|
|
3062
3322
|
existingEvents.push(event);
|
|
3063
3323
|
eventsPerWarning.set(warning, existingEvents);
|
|
3064
3324
|
}
|
|
3065
|
-
function
|
|
3325
|
+
function handleEvent12(event) {
|
|
3066
3326
|
if (event.name === TraceEvents_exports.KnownEventName.RunTask) {
|
|
3067
3327
|
const { duration } = Timing_exports3.eventTimingsMicroSeconds(event);
|
|
3068
3328
|
if (duration > LONG_MAIN_THREAD_TASK_THRESHOLD) {
|
|
@@ -3090,7 +3350,7 @@ function handleEvent11(event) {
|
|
|
3090
3350
|
return;
|
|
3091
3351
|
}
|
|
3092
3352
|
}
|
|
3093
|
-
function
|
|
3353
|
+
function data12() {
|
|
3094
3354
|
return {
|
|
3095
3355
|
perEvent: new Map(warningsPerEvent),
|
|
3096
3356
|
perWarning: new Map(eventsPerWarning)
|
|
@@ -3100,11 +3360,11 @@ function data11() {
|
|
|
3100
3360
|
// front_end/models/trace/handlers/WorkersHandler.ts
|
|
3101
3361
|
var WorkersHandler_exports = {};
|
|
3102
3362
|
__export(WorkersHandler_exports, {
|
|
3103
|
-
data: () =>
|
|
3104
|
-
finalize: () =>
|
|
3105
|
-
handleEvent: () =>
|
|
3363
|
+
data: () => data13,
|
|
3364
|
+
finalize: () => finalize11,
|
|
3365
|
+
handleEvent: () => handleEvent13,
|
|
3106
3366
|
initialize: () => initialize5,
|
|
3107
|
-
reset: () =>
|
|
3367
|
+
reset: () => reset13
|
|
3108
3368
|
});
|
|
3109
3369
|
var handlerState8 = 1 /* UNINITIALIZED */;
|
|
3110
3370
|
var sessionIdEvents = [];
|
|
@@ -3116,12 +3376,12 @@ function initialize5() {
|
|
|
3116
3376
|
}
|
|
3117
3377
|
handlerState8 = 2 /* INITIALIZED */;
|
|
3118
3378
|
}
|
|
3119
|
-
function
|
|
3379
|
+
function reset13() {
|
|
3120
3380
|
sessionIdEvents.length = 0;
|
|
3121
3381
|
workerIdByThread.clear();
|
|
3122
3382
|
handlerState8 = 1 /* UNINITIALIZED */;
|
|
3123
3383
|
}
|
|
3124
|
-
function
|
|
3384
|
+
function handleEvent13(event) {
|
|
3125
3385
|
if (handlerState8 !== 2 /* INITIALIZED */) {
|
|
3126
3386
|
throw new Error("Workers Handler is not initialized");
|
|
3127
3387
|
}
|
|
@@ -3129,7 +3389,7 @@ function handleEvent12(event) {
|
|
|
3129
3389
|
sessionIdEvents.push(event);
|
|
3130
3390
|
}
|
|
3131
3391
|
}
|
|
3132
|
-
async function
|
|
3392
|
+
async function finalize11() {
|
|
3133
3393
|
if (handlerState8 !== 2 /* INITIALIZED */) {
|
|
3134
3394
|
throw new Error("Handler is not initialized");
|
|
3135
3395
|
}
|
|
@@ -3142,7 +3402,7 @@ async function finalize10() {
|
|
|
3142
3402
|
}
|
|
3143
3403
|
handlerState8 = 3 /* FINALIZED */;
|
|
3144
3404
|
}
|
|
3145
|
-
function
|
|
3405
|
+
function data13() {
|
|
3146
3406
|
if (handlerState8 !== 3 /* FINALIZED */) {
|
|
3147
3407
|
throw new Error("Workers Handler is not finalized");
|
|
3148
3408
|
}
|
|
@@ -3156,6 +3416,7 @@ function data12() {
|
|
|
3156
3416
|
// front_end/models/trace/handlers/Migration.ts
|
|
3157
3417
|
var ENABLED_TRACE_HANDLERS = {
|
|
3158
3418
|
Animations: AnimationHandler_exports,
|
|
3419
|
+
AuctionWorklets: AuctionWorkletsHandler_exports,
|
|
3159
3420
|
UserTimings: UserTimingsHandler_exports,
|
|
3160
3421
|
PageLoadMetrics: PageLoadMetricsHandler_exports,
|
|
3161
3422
|
UserInteractions: UserInteractionsHandler_exports,
|
|
@@ -3190,119 +3451,6 @@ __export(ModelHandlers_exports, {
|
|
|
3190
3451
|
Workers: () => WorkersHandler_exports
|
|
3191
3452
|
});
|
|
3192
3453
|
|
|
3193
|
-
// front_end/models/trace/handlers/AuctionWorkletsHandler.ts
|
|
3194
|
-
var AuctionWorkletsHandler_exports = {};
|
|
3195
|
-
__export(AuctionWorkletsHandler_exports, {
|
|
3196
|
-
data: () => data13,
|
|
3197
|
-
finalize: () => finalize11,
|
|
3198
|
-
handleEvent: () => handleEvent13,
|
|
3199
|
-
reset: () => reset13
|
|
3200
|
-
});
|
|
3201
|
-
var runningInProcessEvents = /* @__PURE__ */ new Map();
|
|
3202
|
-
var doneWithProcessEvents = /* @__PURE__ */ new Map();
|
|
3203
|
-
var createdSyntheticEvents = /* @__PURE__ */ new Map();
|
|
3204
|
-
var utilityThreads = /* @__PURE__ */ new Map();
|
|
3205
|
-
var v8HelperThreads = /* @__PURE__ */ new Map();
|
|
3206
|
-
function reset13() {
|
|
3207
|
-
runningInProcessEvents.clear();
|
|
3208
|
-
doneWithProcessEvents.clear();
|
|
3209
|
-
createdSyntheticEvents.clear();
|
|
3210
|
-
utilityThreads.clear();
|
|
3211
|
-
v8HelperThreads.clear();
|
|
3212
|
-
}
|
|
3213
|
-
function handleEvent13(event) {
|
|
3214
|
-
if (TraceEvents_exports.isTraceEventAuctionWorkletRunningInProcess(event)) {
|
|
3215
|
-
runningInProcessEvents.set(event.args.data.pid, event);
|
|
3216
|
-
return;
|
|
3217
|
-
}
|
|
3218
|
-
if (TraceEvents_exports.isTraceEventAuctionWorkletDoneWithProcess(event)) {
|
|
3219
|
-
doneWithProcessEvents.set(event.args.data.pid, event);
|
|
3220
|
-
return;
|
|
3221
|
-
}
|
|
3222
|
-
if (TraceEvents_exports.isThreadName(event)) {
|
|
3223
|
-
if (event.args.name === "auction_worklet.CrUtilityMain") {
|
|
3224
|
-
utilityThreads.set(event.pid, event);
|
|
3225
|
-
return;
|
|
3226
|
-
}
|
|
3227
|
-
if (event.args.name === "AuctionV8HelperThread") {
|
|
3228
|
-
v8HelperThreads.set(event.pid, event);
|
|
3229
|
-
}
|
|
3230
|
-
}
|
|
3231
|
-
}
|
|
3232
|
-
function workletType(input) {
|
|
3233
|
-
switch (input) {
|
|
3234
|
-
case "seller":
|
|
3235
|
-
return TraceEvents_exports.AuctionWorkletType.SELLER;
|
|
3236
|
-
case "bidder":
|
|
3237
|
-
return TraceEvents_exports.AuctionWorkletType.BIDDER;
|
|
3238
|
-
default:
|
|
3239
|
-
return TraceEvents_exports.AuctionWorkletType.UNKNOWN;
|
|
3240
|
-
}
|
|
3241
|
-
}
|
|
3242
|
-
function makeSyntheticEventBase(event) {
|
|
3243
|
-
return {
|
|
3244
|
-
name: "SyntheticAuctionWorkletEvent",
|
|
3245
|
-
s: TraceEvents_exports.TraceEventScope.THREAD,
|
|
3246
|
-
cat: event.cat,
|
|
3247
|
-
tid: event.tid,
|
|
3248
|
-
ts: event.ts,
|
|
3249
|
-
ph: TraceEvents_exports.Phase.INSTANT,
|
|
3250
|
-
pid: event.args.data.pid,
|
|
3251
|
-
host: event.args.data.host,
|
|
3252
|
-
target: event.args.data.target,
|
|
3253
|
-
type: workletType(event.args.data.type)
|
|
3254
|
-
};
|
|
3255
|
-
}
|
|
3256
|
-
async function finalize11() {
|
|
3257
|
-
for (const [pid, utilityThreadNameEvent] of utilityThreads) {
|
|
3258
|
-
const v8HelperEvent = v8HelperThreads.get(pid);
|
|
3259
|
-
if (!v8HelperEvent) {
|
|
3260
|
-
continue;
|
|
3261
|
-
}
|
|
3262
|
-
const runningEvent = runningInProcessEvents.get(pid);
|
|
3263
|
-
const doneWithEvent = doneWithProcessEvents.get(pid);
|
|
3264
|
-
let syntheticEvent = null;
|
|
3265
|
-
if (runningEvent) {
|
|
3266
|
-
syntheticEvent = {
|
|
3267
|
-
...makeSyntheticEventBase(runningEvent),
|
|
3268
|
-
args: {
|
|
3269
|
-
data: {
|
|
3270
|
-
runningInProcessEvent: runningEvent,
|
|
3271
|
-
utilityThread: utilityThreadNameEvent,
|
|
3272
|
-
v8HelperThread: v8HelperEvent
|
|
3273
|
-
}
|
|
3274
|
-
}
|
|
3275
|
-
};
|
|
3276
|
-
if (doneWithEvent) {
|
|
3277
|
-
syntheticEvent.args.data.doneWithProcessEvent = doneWithEvent;
|
|
3278
|
-
}
|
|
3279
|
-
} else if (doneWithEvent) {
|
|
3280
|
-
syntheticEvent = {
|
|
3281
|
-
...makeSyntheticEventBase(doneWithEvent),
|
|
3282
|
-
args: {
|
|
3283
|
-
data: {
|
|
3284
|
-
doneWithProcessEvent: doneWithEvent,
|
|
3285
|
-
utilityThread: utilityThreadNameEvent,
|
|
3286
|
-
v8HelperThread: v8HelperEvent
|
|
3287
|
-
}
|
|
3288
|
-
}
|
|
3289
|
-
};
|
|
3290
|
-
if (runningEvent) {
|
|
3291
|
-
syntheticEvent.args.data.runningInProcessEvent = runningEvent;
|
|
3292
|
-
}
|
|
3293
|
-
}
|
|
3294
|
-
if (syntheticEvent === null) {
|
|
3295
|
-
continue;
|
|
3296
|
-
}
|
|
3297
|
-
createdSyntheticEvents.set(pid, syntheticEvent);
|
|
3298
|
-
}
|
|
3299
|
-
}
|
|
3300
|
-
function data13() {
|
|
3301
|
-
return {
|
|
3302
|
-
worklets: new Map(createdSyntheticEvents)
|
|
3303
|
-
};
|
|
3304
|
-
}
|
|
3305
|
-
|
|
3306
3454
|
// front_end/models/trace/handlers/LargestImagePaintHandler.ts
|
|
3307
3455
|
var LargestImagePaintHandler_exports = {};
|
|
3308
3456
|
__export(LargestImagePaintHandler_exports, {
|
|
@@ -3368,16 +3516,15 @@ __export(RendererHandler_exports, {
|
|
|
3368
3516
|
makeCompleteEvent: () => makeCompleteEvent,
|
|
3369
3517
|
reset: () => reset17,
|
|
3370
3518
|
sanitizeProcesses: () => sanitizeProcesses,
|
|
3371
|
-
sanitizeThreads: () => sanitizeThreads
|
|
3372
|
-
treify: () => treify
|
|
3519
|
+
sanitizeThreads: () => sanitizeThreads
|
|
3373
3520
|
});
|
|
3374
3521
|
|
|
3375
3522
|
// front_end/models/trace/handlers/SamplesHandler.ts
|
|
3376
3523
|
var SamplesHandler_exports = {};
|
|
3377
3524
|
__export(SamplesHandler_exports, {
|
|
3378
|
-
buildProfileCalls: () => buildProfileCalls,
|
|
3379
3525
|
data: () => data16,
|
|
3380
3526
|
finalize: () => finalize12,
|
|
3527
|
+
getProfileCallFunctionName: () => getProfileCallFunctionName,
|
|
3381
3528
|
handleEvent: () => handleEvent16,
|
|
3382
3529
|
initialize: () => initialize6,
|
|
3383
3530
|
reset: () => reset16
|
|
@@ -3858,61 +4005,63 @@ var CPUProfileDataModel = class extends ProfileTreeModel {
|
|
|
3858
4005
|
// front_end/models/trace/handlers/SamplesHandler.ts
|
|
3859
4006
|
var events = /* @__PURE__ */ new Map();
|
|
3860
4007
|
var profilesInProcess = /* @__PURE__ */ new Map();
|
|
4008
|
+
var entryToNode = /* @__PURE__ */ new Map();
|
|
3861
4009
|
var preprocessedData = /* @__PURE__ */ new Map();
|
|
3862
4010
|
var handlerState9 = 1 /* UNINITIALIZED */;
|
|
3863
4011
|
function buildProfileCalls() {
|
|
3864
4012
|
for (const [processId, profiles] of preprocessedData) {
|
|
3865
4013
|
for (const [profileId, preProcessedData] of profiles) {
|
|
3866
|
-
let openFrameCallback = function(
|
|
4014
|
+
let openFrameCallback = function(depth, node, timeStampMs) {
|
|
4015
|
+
if (threadId === void 0) {
|
|
4016
|
+
return;
|
|
4017
|
+
}
|
|
3867
4018
|
const ts = Timing_exports3.millisecondsToMicroseconds(Timing_exports2.MilliSeconds(timeStampMs));
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
4019
|
+
const nodeId = node.id;
|
|
4020
|
+
const profileCall = Trace_exports.makeProfileCall(node, ts, processId, threadId);
|
|
4021
|
+
finalizedData.profileCalls.push(profileCall);
|
|
4022
|
+
indexStack.push(finalizedData.profileCalls.length - 1);
|
|
4023
|
+
const traceEntryNode = TreeHelpers_exports.makeEmptyTraceEntryNode(profileCall, nodeId);
|
|
4024
|
+
finalizedData.profileTree?.nodes.set(nodeId, traceEntryNode);
|
|
4025
|
+
entryToNode.set(profileCall, traceEntryNode);
|
|
4026
|
+
traceEntryNode.depth = depth;
|
|
4027
|
+
if (indexStack.length === 1) {
|
|
4028
|
+
finalizedData.profileTree?.roots.add(traceEntryNode);
|
|
4029
|
+
}
|
|
4030
|
+
}, closeFrameCallback = function(_depth, node, _timeStamp, durMs, selfTimeMs) {
|
|
4031
|
+
const profileCallIndex = indexStack.pop();
|
|
4032
|
+
const profileCall = profileCallIndex !== void 0 && finalizedData.profileCalls[profileCallIndex];
|
|
4033
|
+
if (!profileCall) {
|
|
3872
4034
|
return;
|
|
3873
4035
|
}
|
|
3874
|
-
const { callFrame, ts, pid,
|
|
3875
|
-
|
|
4036
|
+
const { callFrame, ts, pid, tid } = profileCall;
|
|
4037
|
+
const traceEntryNode = entryToNode.get(profileCall);
|
|
4038
|
+
if (callFrame === void 0 || ts === void 0 || pid === void 0 || profileId === void 0 || tid === void 0 || traceEntryNode === void 0) {
|
|
3876
4039
|
return;
|
|
3877
4040
|
}
|
|
3878
4041
|
const dur = Timing_exports3.millisecondsToMicroseconds(Timing_exports2.MilliSeconds(durMs));
|
|
3879
4042
|
const selfTime = Timing_exports3.millisecondsToMicroseconds(Timing_exports2.MilliSeconds(selfTimeMs));
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
children,
|
|
3887
|
-
ph: TraceEvents_exports.Phase.COMPLETE,
|
|
3888
|
-
cat: "",
|
|
3889
|
-
args: {},
|
|
3890
|
-
name: "ProfileCall",
|
|
3891
|
-
tid,
|
|
3892
|
-
nodeId: node.id
|
|
3893
|
-
};
|
|
3894
|
-
const parent = trackingStack.at(-1);
|
|
3895
|
-
const calls = finalizedData.profileCalls;
|
|
3896
|
-
calls.push(completeProfileCall);
|
|
3897
|
-
if (!parent) {
|
|
4043
|
+
profileCall.dur = dur;
|
|
4044
|
+
profileCall.selfTime = selfTime;
|
|
4045
|
+
const parentIndex = indexStack.at(-1);
|
|
4046
|
+
const parent = parentIndex !== void 0 && finalizedData.profileCalls.at(parentIndex);
|
|
4047
|
+
const parentNode = parent && entryToNode.get(parent);
|
|
4048
|
+
if (!parentNode) {
|
|
3898
4049
|
return;
|
|
3899
4050
|
}
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
if (parent.selfTime) {
|
|
3903
|
-
parent.selfTime = Timing_exports2.MicroSeconds(parent.selfTime - dur);
|
|
3904
|
-
}
|
|
4051
|
+
traceEntryNode.parentId = parentNode.id;
|
|
4052
|
+
parentNode.children.add(traceEntryNode);
|
|
3905
4053
|
};
|
|
3906
4054
|
const threadId = preProcessedData.threadId;
|
|
3907
|
-
if (!preProcessedData.rawProfile.nodes.length ||
|
|
4055
|
+
if (!preProcessedData.rawProfile.nodes.length || threadId === void 0) {
|
|
3908
4056
|
continue;
|
|
3909
4057
|
}
|
|
3910
|
-
const
|
|
4058
|
+
const indexStack = [];
|
|
3911
4059
|
const profileModel = new CPUProfileDataModel_exports.CPUProfileDataModel(preProcessedData.rawProfile);
|
|
3912
|
-
const
|
|
3913
|
-
profileModel.
|
|
3914
|
-
|
|
4060
|
+
const profileTree = TreeHelpers_exports.makeEmptyTraceEntryTree();
|
|
4061
|
+
profileTree.maxDepth = profileModel.maxDepth;
|
|
4062
|
+
const finalizedData = { rawProfile: preProcessedData.rawProfile, parsedProfile: profileModel, profileCalls: [], profileTree };
|
|
3915
4063
|
const dataByThread = map_utilities_exports.getWithDefault(profilesInProcess, processId, () => /* @__PURE__ */ new Map());
|
|
4064
|
+
profileModel.forEachFrame(openFrameCallback, closeFrameCallback);
|
|
3916
4065
|
dataByThread.set(threadId, finalizedData);
|
|
3917
4066
|
}
|
|
3918
4067
|
}
|
|
@@ -3921,6 +4070,7 @@ function reset16() {
|
|
|
3921
4070
|
events.clear();
|
|
3922
4071
|
preprocessedData.clear();
|
|
3923
4072
|
profilesInProcess.clear();
|
|
4073
|
+
entryToNode.clear();
|
|
3924
4074
|
handlerState9 = 1 /* UNINITIALIZED */;
|
|
3925
4075
|
}
|
|
3926
4076
|
function initialize6() {
|
|
@@ -3933,6 +4083,15 @@ function handleEvent16(event) {
|
|
|
3933
4083
|
if (handlerState9 !== 2 /* INITIALIZED */) {
|
|
3934
4084
|
throw new Error("Samples Handler is not initialized");
|
|
3935
4085
|
}
|
|
4086
|
+
if (TraceEvents_exports.isSyntheticTraceEventCpuProfile(event)) {
|
|
4087
|
+
const pid = event.pid;
|
|
4088
|
+
const tid = event.tid;
|
|
4089
|
+
const profileId = "0x1";
|
|
4090
|
+
const profileData = getOrCreatePreProcessedData(pid, profileId);
|
|
4091
|
+
profileData.rawProfile = event.args.data.cpuProfile;
|
|
4092
|
+
profileData.threadId = tid;
|
|
4093
|
+
return;
|
|
4094
|
+
}
|
|
3936
4095
|
if (TraceEvents_exports.isTraceEventProfile(event)) {
|
|
3937
4096
|
const profileData = getOrCreatePreProcessedData(event.pid, event.id);
|
|
3938
4097
|
profileData.rawProfile.startTime = event.ts;
|
|
@@ -3991,7 +4150,8 @@ function data16() {
|
|
|
3991
4150
|
throw new Error("Samples Handler is not finalized");
|
|
3992
4151
|
}
|
|
3993
4152
|
return {
|
|
3994
|
-
profilesInProcess: new Map(profilesInProcess)
|
|
4153
|
+
profilesInProcess: new Map(profilesInProcess),
|
|
4154
|
+
entryToNode: new Map(entryToNode)
|
|
3995
4155
|
};
|
|
3996
4156
|
}
|
|
3997
4157
|
function getOrCreatePreProcessedData(processId, profileId) {
|
|
@@ -4008,14 +4168,20 @@ function getOrCreatePreProcessedData(processId, profileId) {
|
|
|
4008
4168
|
profileId
|
|
4009
4169
|
}));
|
|
4010
4170
|
}
|
|
4171
|
+
function getProfileCallFunctionName(data18, entry) {
|
|
4172
|
+
const profile = data18.profilesInProcess.get(entry.pid)?.get(entry.tid);
|
|
4173
|
+
const node = profile?.parsedProfile.nodeById(entry.nodeId);
|
|
4174
|
+
if (node?.functionName) {
|
|
4175
|
+
return node.functionName;
|
|
4176
|
+
}
|
|
4177
|
+
return entry.callFrame.functionName;
|
|
4178
|
+
}
|
|
4011
4179
|
|
|
4012
4180
|
// front_end/models/trace/handlers/RendererHandler.ts
|
|
4013
4181
|
var processes = /* @__PURE__ */ new Map();
|
|
4014
4182
|
var compositorTileWorkers = Array();
|
|
4015
|
-
var
|
|
4183
|
+
var entryToNode2 = /* @__PURE__ */ new Map();
|
|
4016
4184
|
var allRendererEvents = [];
|
|
4017
|
-
var nodeIdCount = 0;
|
|
4018
|
-
var makeRendererEntrytNodeId = () => ++nodeIdCount;
|
|
4019
4185
|
var completeEventStack = [];
|
|
4020
4186
|
var handlerState10 = 1 /* UNINITIALIZED */;
|
|
4021
4187
|
var config = Configuration_exports.DEFAULT;
|
|
@@ -4028,18 +4194,6 @@ var makeRendererThread = () => ({
|
|
|
4028
4194
|
name: null,
|
|
4029
4195
|
entries: []
|
|
4030
4196
|
});
|
|
4031
|
-
var makeEmptyRendererTree = () => ({
|
|
4032
|
-
nodes: /* @__PURE__ */ new Map(),
|
|
4033
|
-
roots: /* @__PURE__ */ new Set(),
|
|
4034
|
-
maxDepth: 0
|
|
4035
|
-
});
|
|
4036
|
-
var makeEmptyRendererEventNode = (entry, id) => ({
|
|
4037
|
-
entry,
|
|
4038
|
-
id,
|
|
4039
|
-
parentId: null,
|
|
4040
|
-
children: /* @__PURE__ */ new Set(),
|
|
4041
|
-
depth: 0
|
|
4042
|
-
});
|
|
4043
4197
|
var getOrCreateRendererProcess = (processes2, pid) => {
|
|
4044
4198
|
return map_utilities_exports.getWithDefault(processes2, pid, makeRendererProcess);
|
|
4045
4199
|
};
|
|
@@ -4051,11 +4205,10 @@ function handleUserConfig(userConfig) {
|
|
|
4051
4205
|
}
|
|
4052
4206
|
function reset17() {
|
|
4053
4207
|
processes.clear();
|
|
4054
|
-
|
|
4208
|
+
entryToNode2.clear();
|
|
4055
4209
|
allRendererEvents.length = 0;
|
|
4056
4210
|
completeEventStack.length = 0;
|
|
4057
4211
|
compositorTileWorkers.length = 0;
|
|
4058
|
-
nodeIdCount = -1;
|
|
4059
4212
|
handlerState10 = 1 /* UNINITIALIZED */;
|
|
4060
4213
|
}
|
|
4061
4214
|
function initialize7() {
|
|
@@ -4096,7 +4249,7 @@ async function finalize13() {
|
|
|
4096
4249
|
if (handlerState10 !== 2 /* INITIALIZED */) {
|
|
4097
4250
|
throw new Error("Renderer Handler is not initialized");
|
|
4098
4251
|
}
|
|
4099
|
-
const { mainFrameId: mainFrameId2, rendererProcessesByFrame, threadsInProcess: threadsInProcess2 } =
|
|
4252
|
+
const { mainFrameId: mainFrameId2, rendererProcessesByFrame, threadsInProcess: threadsInProcess2 } = data3();
|
|
4100
4253
|
assignMeta(processes, mainFrameId2, rendererProcessesByFrame, threadsInProcess2);
|
|
4101
4254
|
sanitizeProcesses(processes);
|
|
4102
4255
|
buildHierarchy(processes);
|
|
@@ -4110,7 +4263,7 @@ function data17() {
|
|
|
4110
4263
|
return {
|
|
4111
4264
|
processes: new Map(processes),
|
|
4112
4265
|
compositorTileWorkers: new Map(gatherCompositorThreads()),
|
|
4113
|
-
entryToNode: new Map(
|
|
4266
|
+
entryToNode: new Map(entryToNode2),
|
|
4114
4267
|
allRendererEvents: [...allRendererEvents]
|
|
4115
4268
|
};
|
|
4116
4269
|
}
|
|
@@ -4167,9 +4320,15 @@ function assignThreadName(processes2, rendererProcessesByFrame, threadsInProcess
|
|
|
4167
4320
|
}
|
|
4168
4321
|
}
|
|
4169
4322
|
function sanitizeProcesses(processes2) {
|
|
4323
|
+
const auctionWorklets = data2().worklets;
|
|
4170
4324
|
for (const [pid, process] of processes2) {
|
|
4171
4325
|
if (process.url === null) {
|
|
4172
|
-
|
|
4326
|
+
const maybeWorklet = auctionWorklets.get(pid);
|
|
4327
|
+
if (maybeWorklet) {
|
|
4328
|
+
process.url = maybeWorklet.host;
|
|
4329
|
+
} else {
|
|
4330
|
+
processes2.delete(pid);
|
|
4331
|
+
}
|
|
4173
4332
|
continue;
|
|
4174
4333
|
}
|
|
4175
4334
|
const asUrl = new URL(process.url);
|
|
@@ -4191,7 +4350,7 @@ function buildHierarchy(processes2, options) {
|
|
|
4191
4350
|
for (const [pid, process] of processes2) {
|
|
4192
4351
|
for (const [tid, thread] of process.threads) {
|
|
4193
4352
|
if (!thread.entries.length) {
|
|
4194
|
-
thread.tree =
|
|
4353
|
+
thread.tree = TreeHelpers_exports.makeEmptyTraceEntryTree();
|
|
4195
4354
|
continue;
|
|
4196
4355
|
}
|
|
4197
4356
|
Trace_exports.sortTraceEventsInPlace(thread.entries);
|
|
@@ -4201,69 +4360,13 @@ function buildHierarchy(processes2, options) {
|
|
|
4201
4360
|
if (profileCalls) {
|
|
4202
4361
|
thread.entries = Trace_exports.mergeEventsInOrder(thread.entries, profileCalls);
|
|
4203
4362
|
}
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
const stack = [];
|
|
4210
|
-
nodeIdCount = -1;
|
|
4211
|
-
const tree = makeEmptyRendererTree();
|
|
4212
|
-
for (let i = 0; i < entries.length; i++) {
|
|
4213
|
-
const event = entries[i];
|
|
4214
|
-
if (options && !options.filter.has(event.name)) {
|
|
4215
|
-
continue;
|
|
4216
|
-
}
|
|
4217
|
-
const duration = event.dur || 0;
|
|
4218
|
-
const nodeId = makeRendererEntrytNodeId();
|
|
4219
|
-
const node = makeEmptyRendererEventNode(event, nodeId);
|
|
4220
|
-
if (stack.length === 0) {
|
|
4221
|
-
tree.nodes.set(nodeId, node);
|
|
4222
|
-
tree.roots.add(node);
|
|
4223
|
-
event.selfTime = Timing_exports2.MicroSeconds(duration);
|
|
4224
|
-
stack.push(node);
|
|
4225
|
-
tree.maxDepth = Math.max(tree.maxDepth, stack.length);
|
|
4226
|
-
entryToNode.set(event, node);
|
|
4227
|
-
continue;
|
|
4228
|
-
}
|
|
4229
|
-
const parentNode = stack.at(-1);
|
|
4230
|
-
if (parentNode === void 0) {
|
|
4231
|
-
throw new Error("Impossible: no parent node found in the stack");
|
|
4232
|
-
}
|
|
4233
|
-
const parentEvent = parentNode.entry;
|
|
4234
|
-
const begin = event.ts;
|
|
4235
|
-
const parentBegin = parentEvent.ts;
|
|
4236
|
-
const parentDuration = parentEvent.dur || 0;
|
|
4237
|
-
const end = begin + duration;
|
|
4238
|
-
const parentEnd = parentBegin + parentDuration;
|
|
4239
|
-
const startsBeforeParent = begin < parentBegin;
|
|
4240
|
-
if (startsBeforeParent) {
|
|
4241
|
-
throw new Error("Impossible: current event starts before the parent event");
|
|
4242
|
-
}
|
|
4243
|
-
const startsAfterParent = begin >= parentEnd;
|
|
4244
|
-
if (startsAfterParent) {
|
|
4245
|
-
stack.pop();
|
|
4246
|
-
i--;
|
|
4247
|
-
nodeIdCount--;
|
|
4248
|
-
continue;
|
|
4249
|
-
}
|
|
4250
|
-
const endsAfterParent = end > parentEnd;
|
|
4251
|
-
if (endsAfterParent) {
|
|
4252
|
-
continue;
|
|
4253
|
-
}
|
|
4254
|
-
tree.nodes.set(nodeId, node);
|
|
4255
|
-
node.depth = stack.length;
|
|
4256
|
-
node.parentId = parentNode.id;
|
|
4257
|
-
parentNode.children.add(node);
|
|
4258
|
-
event.selfTime = Timing_exports2.MicroSeconds(duration);
|
|
4259
|
-
if (parentEvent.selfTime !== void 0) {
|
|
4260
|
-
parentEvent.selfTime = Timing_exports2.MicroSeconds(parentEvent.selfTime - (event.dur || 0));
|
|
4363
|
+
const treeData = TreeHelpers_exports.treify(thread.entries, options);
|
|
4364
|
+
thread.tree = treeData.tree;
|
|
4365
|
+
for (const [entry, node] of treeData.entryToNode) {
|
|
4366
|
+
entryToNode2.set(entry, node);
|
|
4367
|
+
}
|
|
4261
4368
|
}
|
|
4262
|
-
stack.push(node);
|
|
4263
|
-
tree.maxDepth = Math.max(tree.maxDepth, stack.length);
|
|
4264
|
-
entryToNode.set(event, node);
|
|
4265
4369
|
}
|
|
4266
|
-
return tree;
|
|
4267
4370
|
}
|
|
4268
4371
|
function makeCompleteEvent(event) {
|
|
4269
4372
|
if (TraceEvents_exports.isTraceEventEnd(event)) {
|
|
@@ -4287,11 +4390,77 @@ function makeCompleteEvent(event) {
|
|
|
4287
4390
|
return syntheticComplete;
|
|
4288
4391
|
}
|
|
4289
4392
|
function deps6() {
|
|
4290
|
-
return ["Meta", "Samples"];
|
|
4393
|
+
return ["Meta", "Samples", "AuctionWorklets"];
|
|
4394
|
+
}
|
|
4395
|
+
|
|
4396
|
+
// front_end/models/trace/handlers/Threads.ts
|
|
4397
|
+
var Threads_exports = {};
|
|
4398
|
+
__export(Threads_exports, {
|
|
4399
|
+
ThreadType: () => ThreadType,
|
|
4400
|
+
threadsInTrace: () => threadsInTrace
|
|
4401
|
+
});
|
|
4402
|
+
var ThreadType = /* @__PURE__ */ ((ThreadType2) => {
|
|
4403
|
+
ThreadType2["MAIN_THREAD"] = "MAIN_THREAD";
|
|
4404
|
+
ThreadType2["WORKER"] = "WORKER";
|
|
4405
|
+
ThreadType2["RASTERIZER"] = "RASTERIZER";
|
|
4406
|
+
ThreadType2["AUCTION_WORKLET"] = "AUCTION_WORKLET";
|
|
4407
|
+
ThreadType2["OTHER"] = "OTHER";
|
|
4408
|
+
ThreadType2["CPU_PROFILE"] = "CPU_PROFILE";
|
|
4409
|
+
return ThreadType2;
|
|
4410
|
+
})(ThreadType || {});
|
|
4411
|
+
function getThreadTypeForRendererThread(traceParseData, pid, thread) {
|
|
4412
|
+
let threadType = "OTHER" /* OTHER */;
|
|
4413
|
+
if (thread.name === "CrRendererMain") {
|
|
4414
|
+
threadType = "MAIN_THREAD" /* MAIN_THREAD */;
|
|
4415
|
+
} else if (thread.name === "DedicatedWorker thread") {
|
|
4416
|
+
threadType = "WORKER" /* WORKER */;
|
|
4417
|
+
} else if (thread.name?.startsWith("CompositorTileWorker")) {
|
|
4418
|
+
threadType = "RASTERIZER" /* RASTERIZER */;
|
|
4419
|
+
} else if (traceParseData.AuctionWorklets.worklets.has(pid)) {
|
|
4420
|
+
threadType = "AUCTION_WORKLET" /* AUCTION_WORKLET */;
|
|
4421
|
+
}
|
|
4422
|
+
return threadType;
|
|
4423
|
+
}
|
|
4424
|
+
function threadsInTrace(traceParseData) {
|
|
4425
|
+
const foundThreads = [];
|
|
4426
|
+
if (traceParseData.Renderer && traceParseData.Renderer.processes.size) {
|
|
4427
|
+
for (const [pid, process] of traceParseData.Renderer.processes) {
|
|
4428
|
+
for (const [tid, thread] of process.threads) {
|
|
4429
|
+
const threadType = getThreadTypeForRendererThread(traceParseData, pid, thread);
|
|
4430
|
+
if (!thread.tree) {
|
|
4431
|
+
continue;
|
|
4432
|
+
}
|
|
4433
|
+
foundThreads.push({
|
|
4434
|
+
name: thread.name,
|
|
4435
|
+
pid,
|
|
4436
|
+
tid,
|
|
4437
|
+
entries: thread.entries,
|
|
4438
|
+
tree: thread.tree,
|
|
4439
|
+
type: threadType,
|
|
4440
|
+
entryToNode: traceParseData.Renderer.entryToNode
|
|
4441
|
+
});
|
|
4442
|
+
}
|
|
4443
|
+
}
|
|
4444
|
+
} else if (traceParseData.Samples && traceParseData.Samples.profilesInProcess.size) {
|
|
4445
|
+
for (const [pid, process] of traceParseData.Samples.profilesInProcess) {
|
|
4446
|
+
for (const [tid, thread] of process) {
|
|
4447
|
+
if (!thread.profileTree) {
|
|
4448
|
+
continue;
|
|
4449
|
+
}
|
|
4450
|
+
foundThreads.push({
|
|
4451
|
+
pid,
|
|
4452
|
+
tid,
|
|
4453
|
+
name: null,
|
|
4454
|
+
entries: thread.profileCalls,
|
|
4455
|
+
tree: thread.profileTree,
|
|
4456
|
+
type: "CPU_PROFILE" /* CPU_PROFILE */,
|
|
4457
|
+
entryToNode: traceParseData.Samples.entryToNode
|
|
4458
|
+
});
|
|
4459
|
+
}
|
|
4460
|
+
}
|
|
4461
|
+
}
|
|
4462
|
+
return foundThreads;
|
|
4291
4463
|
}
|
|
4292
|
-
var RendererEventNodeIdTag = class {
|
|
4293
|
-
#tag;
|
|
4294
|
-
};
|
|
4295
4464
|
|
|
4296
4465
|
// front_end/models/trace/LegacyTracingModel.ts
|
|
4297
4466
|
var LegacyTracingModel_exports = {};
|
|
@@ -5155,8 +5324,8 @@ var Model = class extends EventTarget {
|
|
|
5155
5324
|
#lastRecordingIndex = 0;
|
|
5156
5325
|
#processor;
|
|
5157
5326
|
#config = Configuration_exports.DEFAULT;
|
|
5158
|
-
static createWithAllHandlers() {
|
|
5159
|
-
return new Model(ModelHandlers_exports);
|
|
5327
|
+
static createWithAllHandlers(config2) {
|
|
5328
|
+
return new Model(ModelHandlers_exports, config2);
|
|
5160
5329
|
}
|
|
5161
5330
|
static createWithRequiredHandlersForMigration(config2) {
|
|
5162
5331
|
return new Model(Migration_exports.ENABLED_TRACE_HANDLERS, config2);
|
|
@@ -5276,9 +5445,9 @@ var TreeManipulator = class {
|
|
|
5276
5445
|
#entryToNode;
|
|
5277
5446
|
#lastVisibleEntries = null;
|
|
5278
5447
|
#activeActions = [];
|
|
5279
|
-
constructor(thread,
|
|
5448
|
+
constructor(thread, entryToNode3) {
|
|
5280
5449
|
this.#thread = thread;
|
|
5281
|
-
this.#entryToNode =
|
|
5450
|
+
this.#entryToNode = entryToNode3;
|
|
5282
5451
|
}
|
|
5283
5452
|
applyAction(action) {
|
|
5284
5453
|
if (this.#actionIsActive(action)) {
|