How to use the pprof.heap.profile function in pprof

To help you get started, we’ve selected a few pprof examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleapis / cloud-profiler-nodejs / ts / src / profiler.ts View on Github external
async writeHeapProfile(prof: RequestProfile): Promise {
    if (this.config.disableHeap) {
      throw Error('Cannot collect heap profile, heap profiler not enabled.');
    }
    const p = heapProfiler.profile(
      this.config.ignoreHeapSamplesPath,
      this.sourceMapper
    );
    prof.profileBytes = await profileBytes(p);
    return prof;
  }
}

pprof

pprof support for Node.js

Apache-2.0
Latest version published 3 months ago

Package Health Score

81 / 100
Full package analysis