New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@datadog/pprof

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/pprof - npm Package Compare versions

Comparing version 6.0.0-pre-918c1bd to 6.0.0-pre-bb8dcdd

{
"name": "@datadog/pprof",
"version": "6.0.0-pre-918c1bd",
"version": "6.0.0-pre-bb8dcdd",
"description": "pprof support for Node.js",

@@ -29,3 +29,3 @@ "repository": "datadog/pprof-nodejs",

"test:js": "nyc mocha -r source-map-support/register out/test/test-*.js",
"test": "npm run test:js && npm run test:cpp"
"test": "npm run test:js"
},

@@ -45,3 +45,3 @@ "author": {

"@types/mocha": "^10.0.1",
"@types/node": ">=14",
"@types/node": ">=16",
"@types/sinon": "^10.0.15",

@@ -60,3 +60,3 @@ "@types/tmp": "^0.2.3",

"mocha": "^10.2.0",
"nan": "^2.19.0",
"nan": "^2.22.0",
"nyc": "^15.1.0",

@@ -88,4 +88,4 @@ "sinon": "^15.2.0",

"engines": {
"node": ">=14"
"node": ">=16"
}
}

@@ -10,9 +10,9 @@ # pprof support for Node.js

## Prerequisites
1. Your application will need to be using Node.js 14 or greater.
1. Your application will need to be using Node.js 16 or greater.
2. The `pprof` module has a native component that is used to collect profiles
2. The `pprof` module has a native component that is used to collect profiles
with v8's CPU and Heap profilers. You may need to install additional
dependencies to build this module.
* For Linux: `pprof` has prebuilt binaries available for Linux arm64/x64,
Alpine Linux x64, macOS arm64/x64, windows x64 for Node 14/16/18/20.
* `pprof` has prebuilt binaries available for Linux arm64/x64,
Alpine Linux x64, macOS arm64/x64, and Windows x64 for Node 16/18/20/22/23.
No additional dependencies are required.

@@ -46,3 +46,3 @@ * For other environments: on environments that `pprof` does not have

const profile = await pprof.time.profile({
durationMillis: 10000, // time in milliseconds for which to
durationMillis: 10000, // time in milliseconds for which to
// collect profile.

@@ -68,4 +68,4 @@ });

2. A wall time profile for the job will be saved in
`pprof-profile-${process.pid}.pb.gz`. View the profile with command line
2. A wall time profile for the job will be saved in
`pprof-profile-${process.pid}.pb.gz`. View the profile with command line
[`pprof`][pprof-url]:

@@ -85,6 +85,6 @@ ```sh

heap.start(intervalBytes, stackDepth);
heap.start(intervalBytes, stackDepth);
```
2. Collect heap profiles:
* Collecting and saving a profile in profile.proto format:

@@ -103,7 +103,7 @@ ```javascript

```
* Collecting a heap profile with V8 allocation profile format:
```javascript
const profile = await pprof.heap.v8Profile();
```
```

@@ -110,0 +110,0 @@ [build-image]: https://github.com/Datadog/pprof-nodejs/actions/workflows/build.yml/badge.svg?branch=main