gpt4 book ai didi

javascript - 如何查看 console.profile() 的结果?

转载 作者:可可西里 更新时间:2023-11-01 02:18:43 26 4
gpt4 key购买 nike

根据 Chrome Console API ReferenceMDN Docs ,使用 console.profile('label') 开始分析,稍后使用 console.endProfile() 结束分析,应该会导致一个配置文件添加到配置文件(已在 Chrome 中重命名为性能)面板。

这对我在 Firefox 中有效,但在 Chrome 中运行我的代码时我没有获得任何配置文件。相反,我收到警告:

DevTools: CPU profile parser is fixing 16 missing samples.

我是不是遗漏了什么,或者这是 Chrome DevTools 中的错误?

最佳答案

原来配置文件进入了不同的面板:

CPU profiles added to the JavaScript profiler panel. You can open it by clicking three dots menu (in the top right corner) ⋮-> More tools -> JavaScript Profiler.

关于javascript - 如何查看 console.profile() 的结果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49502744/

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