gpt4 book ai didi

google-chrome-devtools - "Start profiling and reload page"什么时候决定停止自动录制?

转载 作者:行者123 更新时间:2023-12-03 21:38:17 26 4
gpt4 key购买 nike

我经常使用 Chrome DevTools 中的 Performance Timeline 来捕获我页面的性能记录。

大多数时候我使用“开始分析和重新加载页面”,它会自动开始和停止记录。

问题是: DevTools 何时决定停止录制 ?

我注意到它总是在“加载”事件之后继续记录至少几百毫秒,并试图找出页面何时“大部分空闲”。

但这是一个相当模糊的猜测。我很想知道它是否依赖于某些性能事件(例如 Lighthouse 中“互动时间”中使用的事件)?

最佳答案

目前正在等待 threeafter load event .
这没有记录在案,因此将来可能会更改,恕不另行通知。

this._millisecondsToRecordAfterLoadEvent = 3000;

async _loadEventFired(event) {
if (this._state !== Timeline.TimelinePanel.State.Recording || !this._recordingPageReload ||
this._controller.mainTarget() !== event.data.resourceTreeModel.target())
return;
const controller = this._controller;
await new Promise(r => setTimeout(r, this._millisecondsToRecordAfterLoadEvent));

// Check if we're still in the same recording session.
if (controller !== this._controller || this._state !== Timeline.TimelinePanel.State.Recording)
return;
this._stopRecording();
}

关于google-chrome-devtools - "Start profiling and reload page"什么时候决定停止自动录制?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54278305/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com