當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Node.js console.profile([label])用法及代碼示例

console.profile([label])

添加於:v8.0.0

參數

除非在檢查器中使用,否則此方法不會顯示任何內容。 console.profile() 方法使用可選標簽啟動 JavaScript CPU 配置文件,直到調用 console.profileEnd() 。然後將配置文件添加到檢查器的配置文件麵板中。

console.profile('MyLabel');
// Some code
console.profileEnd('MyLabel');
// Adds the profile 'MyLabel' to the Profiles panel of the inspector.

相關用法


注:本文由純淨天空篩選整理自nodejs.org大神的英文原創作品 console.profile([label])。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。