我正在尝试找出什么是CommitLoad事件。 我在记录所有跟踪事件和搜索与主html网络请求时间相关的事件时发现了它:
{ // 1
pid: 37054,
tid: 775,
ts: 29055807727,
ph: "I",
cat: "devtools.timeline",
name: "ResourceSendRequest",
args: {
data: {
requestId: "37054.1",
frame: "0x3b2c921e10",
url: "http://localhost:3000/",
requestMethod: "GET",
priority: "VeryHigh"
}
},
tts: 74256,
s: "t"
},
{ // 2
pid: 37054,
tid: 775,
ts: 29055812323,
ph: "I",
cat: "devtools.timeline",
name: "ResourceReceiveResponse",
args: {
data: {
requestId: "37054.1",
frame: "0x3b2c921e10",
statusCode: 200,
mimeType: "text/html",
encodedDataLength: 202.0,
fromCache: false,
fromServiceWorker: false,
timing: {
requestTime: 29055.809024,
proxyStart: -1.0,
proxyEnd: -1.0,
dnsStart: 1.291000000492204,
dnsEnd: 1.4810000029683579,
connectStart: 1.4810000029683579,
connectEnd: 1.6760000034992117,
sslStart: -1.0,
sslEnd: -1.0,
workerStart: -1.0,
workerReady: -1.0,
sendStart: 1.8110000019078143,
sendEnd: 1.8530000015744008,
receiveHeadersEnd: 2.555000002757879,
pushStart: 0.0,
pushEnd: 0.0
}
}
},
tts: 75181,
s: "t"
},
{ // 3
pid: 37054,
tid: 775,
ts: 29055812787,
ph: "I",
cat: "devtools.timeline",
name: "ResourceReceivedData",
args: {
data: {
requestId: "37054.1",
frame: "0x3b2c921e10",
encodedDataLength: 401
}
},
tts: 75629,
s: "t"
},
{ // 4
pid: 37054,
tid: 775,
ts: 29055818270,
ph: "I",
cat: "devtools.timeline",
name: "ResourceFinish",
args: {
data: {
requestId: "37054.1",
didFail: false,
encodedDataLength: 603.0,
decodedBodyLength: 401.0,
finishTime: 29055.81233
}
},
tts: 80664,
s: "t"
},
{ // 5 - I'm asking about this event. What is this?
pid: 37054,
tid: 775,
ts: 29055817729,
ph: "X",
cat: "devtools.timeline",
name: "CommitLoad",
args: {
data: {
isMainFrame: true,
page: "0x3b2c921e10",
frame: "0x3b2c921e10",
url: "http://localhost:3000/",
name: ""
}
},
dur: 266,
tdur: 266,
tts: 80123
}
我运行200次测试以确定 CommitLoad 的发生时间,它发生在 ResourceFinish 之前:
但我在Chrome性能面板中找不到 CommitLoad :
在完成加载(ResourceFinish)之前79分左右的黄色事件,它被称为事件:readystatechange 。也许这是一些线索。
这是我的完整trace.json。