Console.profile()
非标准
该特性是非标准的,请尽量不要在生产环境中使用它!
开始记录性能描述信息(例如, Firefox performance tool)。
你可以选择提供一个参数来命名描述信息,这将允许你在有多个描述信息被记录时来选择只停止那个描述信息(被你命名的那个)。请查阅Console.profileEnd()
来确认这个参数是如何被解释的。
要停止记录,请调用Console.profileEnd()
。
Note: 此特性在 Web Worker 中可用。
Syntax
console.profile(profileName);
Parameters
profileName
- 描述信息的名字。可选。
浏览器兼容性
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help! (en-US)
特性 | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
基本支持 | 53.0 | (Yes) | (Yes) | (Yes) | ? | ? |
实际可用 | ? | (Yes) | 38.0 (38.0) | ? | ? | ? |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
基本支持 | ? | (Yes) | 10.0 (10.0) | ? | ? | ? |
实际可用 | ? | (Yes) | 38.0 (38.0) | ? | ? | ? |