function

jsc.startSamplingProfiler

optionalDirectory?: string,
sampleInterval?: number
): void;

Starts JavaScriptCore's sampling profiler and leaves it running for the rest of the process. To profile one function and get the result back as a value, use profile instead.

@param optionalDirectory

A directory to write a text report of the hottest functions and bytecodes to when the process (or the calling worker) exits. The directory is created if it doesn't exist.

@param sampleInterval

How often to sample the stack, in microseconds. Defaults to 1000 (once a millisecond).