如何查看console.profile()的结果? [英] How to see results of console.profile()?

查看:1091
本文介绍了如何查看console.profile()的结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 Chrome控制台API参考并使用 MDN文档 console.profile('label')开始分析并稍后使用 console.endProfile()来结束分析,应该导致添加一个配置文件Chrome中的配置文件(已经重命名为Performance)面板。

According to Chrome Console API Reference and MDN Docs, using console.profile('label') to start profiling and later using console.endProfile() to end profiling, should result in a profile added to Profiles (has been since renamed to Performance) panel in Chrome.

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

This works for me in Firefox, but I don't get any profiles when I run my code in Chrome. Instead I get the warning:


DevTools:CPU配置文件解析器正在修复16个丢失的样本。

DevTools: CPU profile parser is fixing 16 missing samples.

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

Am I missing something here or is this a bug in Chrome DevTools?

推荐答案

关闭配置文件进入另一个面板:

Turns out the profile goes into a different panel:


添加到JavaScript探查器面板的CPU配置文件。您可以通过单击三个点菜单(在右上角)打开它$ b $b⋮ - >更多工具 - > JavaScript Profiler。

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.

这篇关于如何查看console.profile()的结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆