heapProfileHandle.getSamples(): Promise
Asynchronously retrieves the worker's retained allocation samples without
stopping profiling or building the full profile call tree. The sample fields and
profiling options are described in
syncHeapProfileHandle.getSamples().
Rejects with ERR_HEAP_PROFILE_NOT_STARTED if this handle has been stopped or
disposed, or ERR_WORKER_NOT_RUNNING if the worker is no longer running.
heapProfileHandle.setSampleInterval(sampleInterval): Promise
Asynchronously updates the worker's sampling interval for future sample
scheduling without restarting profiling or discarding existing samples. Each
sample retains the sampleInterval used when it was selected.
Invalid arguments throw synchronously. The returned promise rejects with
ERR_HEAP_PROFILE_NOT_STARTED if this handle has been stopped or disposed, or
ERR_WORKER_NOT_RUNNING if the worker is no longer running.
heapProfileHandle.stop(): Promise
PromiseStopping collecting the profile, then return a Promise that fulfills with an error or the profile data.
heapProfileHandle[Symbol.asyncDispose](): Promise
PromiseStopping collecting the profile and the profile will be discarded.