2

我正在尝试找出什么是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 毫秒,它被称为Event: readystatechange。也许这是一个线索。

这是我的完整trace.json

4

0 回答 0