Memory Profiling For Mere Mortals

Sampling Memory Allocations

const sh = require('sample-heap-allocations')

sh.startSampling(32, 10)

// allocate some things like Arrays

const allocs = sh.collectAllocations()
console.log(allocs)