性能时间线跟踪中的“CommitLoad”事件是什么?

时间:2017-11-10 14:00:03

标签: javascript performance google-chrome timing resource-timing-api

我正在尝试找出什么是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 之前:

timings

但我在Chrome性能面板中找不到 CommitLoad

chrome performance view

完成加载(ResourceFinish)之前79分左右的黄色事件,它被称为事件:readystatechange 。也许这是一些线索。

这是我的完整trace.json

0 个答案:

没有答案