MCPcopy Index your code
hub / github.com/adaltas/node-csv / printMemoryUsage

Function printMemoryUsage

packages/csv-stringify/samples/api.sync.memory.js:4–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3const r = (v) => (v / 1024 / 1024).toFixed(2);
4const printMemoryUsage = () => {
5 const { rss, heapTotal, heapUsed } = process.memoryUsage();
6 console.log(
7 `Memory usage: rss ${r(rss)}, heap ${r(heapUsed)} / ${r(heapTotal)}`,
8 );
9};
10
11const attempts = 3; // Increase if necessary
12

Callers 1

api.sync.memory.jsFile · 0.85

Calls 1

rFunction · 0.85

Tested by

no test coverage detected