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`); }
原文地址:https://www.cnblogs.com/Answer1215/p/12576430.html
时间: 2024-10-09 21:44:31