Socket
Socket
Sign inDemoInstall

@datadog/pprof

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/pprof

pprof support for Node.js


Version published
Maintainers
1
Created

What is @datadog/pprof?

The @datadog/pprof package is a Node.js module provided by Datadog for profiling Node.js applications. It allows developers to generate and analyze CPU and heap profiles to understand the performance characteristics of their applications and identify bottlenecks or memory leaks.

What are @datadog/pprof's main functionalities?

CPU Profiling

This feature enables CPU profiling, allowing developers to understand where their application spends most of its execution time. The code sample demonstrates how to start CPU profiling with a specified duration and sampling rate.

const profiler = require('@datadog/pprof');
profiler.start({
  service: 'my-service',
  // 10 minutes profiling duration
  duration: 600,
  // Profile CPU every 1000 milliseconds
  sampleRate: 1000
});

Heap Profiling

Heap profiling helps in identifying memory leaks and understanding memory allocation patterns. The code sample shows how to start heap profiling with a specified interval between snapshots.

const profiler = require('@datadog/pprof');
profiler.heap.start({
  service: 'my-service',
  // Take a snapshot every 600 seconds
  snapshotInterval: 600
});

Other packages similar to @datadog/pprof

FAQs

Package last updated on 08 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc