码迷,mamicode.com
首页 > Web开发 > 详细

[HTML 5 Performance] Measuring used JS heap size in chrome

时间:2020-03-26 19:50:09      阅读:102      评论:0      收藏:0      [点我收藏+]

标签:monitor   bug   UNC   color   chrome   deb   uri   console   his   

In this lesson we will see how to measure the used JS heap size in chrome. This can be used for various needs from performance debugging to production monitoring of apps.

 

function measureMemory() {
    console.log(`${performance.memory.usedJSHeapSize / Math.pow(1000, 2)} MB`);
}

 

[HTML 5 Performance] Measuring used JS heap size in chrome

标签:monitor   bug   UNC   color   chrome   deb   uri   console   his   

原文地址:https://www.cnblogs.com/Answer1215/p/12576430.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!