Measure Memory Usage
NodeJS
Easy
4 views
Problem Description
Print heapUsed in MB using process.memoryUsage().
Output Format
Print integer MB.
Constraints
Round to nearest MB.
Official Solution
const m = process.memoryUsage();
const mb = Math.round(m.heapUsed / 1024 / 1024);
console.log(mb);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!