📜  如何理解 nodejs 是否内存不足 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:25.504000             🧑  作者: Mango

代码示例1
const used = process.memoryUsage().heapUsed / 1024 / 1024;
console.log(`The script uses approximately ${Math.round(used * 100) / 100} MB`);