Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

process memory usage javascript

const arr = [1, 2, 3, 4, 5, 6, 9, 7, 8, 9, 10];
arr.reverse();
const used = process.memoryUsage().heapUsed / 1024 / 1024;
console.log(`The script uses approximately ${Math.round(used * 100) / 100} MB`);
Source by www.valentinog.com #
 
PREVIOUS NEXT
Tagged: #process #memory #usage #javascript
ADD COMMENT
Topic
Name
4+4 =