const sh = require('sample-heap-allocations') sh.startSampling(32, 10) // allocate some things like Arrays const allocs = sh.collectAllocations() console.log(allocs)