How to use the pprof.time.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
throw Error('Cannot collect time profile, duration is undefined.');
    }
    const durationMillis = parseDuration(prof.duration);
    if (!durationMillis) {
      throw Error(
        `Cannot collect time profile, duration "${prof.duration}" cannot` +
          ` be parsed.`
      );
    }
    const options = {
      durationMillis,
      intervalMicros: this.config.timeIntervalMicros,
      sourceMapper: this.sourceMapper,
    };

    const p = await timeProfiler.profile(options);
    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