@datadog/pprof 5.2.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -11
- package/package.json +5 -5
- package/prebuilds/darwin-arm64/node-102.node +0 -0
- package/prebuilds/darwin-arm64/node-108.node +0 -0
- package/prebuilds/darwin-arm64/node-111.node +0 -0
- package/prebuilds/darwin-arm64/node-115.node +0 -0
- package/prebuilds/darwin-arm64/node-120.node +0 -0
- package/prebuilds/darwin-arm64/node-83.node +0 -0
- package/prebuilds/darwin-arm64/node-88.node +0 -0
- package/prebuilds/darwin-arm64/node-93.node +0 -0
- package/prebuilds/darwin-x64/node-102.node +0 -0
- package/prebuilds/darwin-x64/node-108.node +0 -0
- package/prebuilds/darwin-x64/node-111.node +0 -0
- package/prebuilds/darwin-x64/node-115.node +0 -0
- package/prebuilds/darwin-x64/node-120.node +0 -0
- package/prebuilds/darwin-x64/node-83.node +0 -0
- package/prebuilds/darwin-x64/node-88.node +0 -0
- package/prebuilds/darwin-x64/node-93.node +0 -0
- package/prebuilds/linux-arm64/node-102.node +0 -0
- package/prebuilds/linux-arm64/node-108.node +0 -0
- package/prebuilds/linux-arm64/node-111.node +0 -0
- package/prebuilds/linux-arm64/node-115.node +0 -0
- package/prebuilds/linux-arm64/node-120.node +0 -0
- package/prebuilds/linux-arm64/node-83.node +0 -0
- package/prebuilds/linux-arm64/node-88.node +0 -0
- package/prebuilds/linux-arm64/node-93.node +0 -0
- package/prebuilds/linux-x64/node-102.node +0 -0
- package/prebuilds/linux-x64/node-108.node +0 -0
- package/prebuilds/linux-x64/node-111.node +0 -0
- package/prebuilds/linux-x64/node-115.node +0 -0
- package/prebuilds/linux-x64/node-120.node +0 -0
- package/prebuilds/linux-x64/node-83.node +0 -0
- package/prebuilds/linux-x64/node-88.node +0 -0
- package/prebuilds/linux-x64/node-93.node +0 -0
- package/prebuilds/linuxmusl-x64/node-102.node +0 -0
- package/prebuilds/linuxmusl-x64/node-108.node +0 -0
- package/prebuilds/linuxmusl-x64/node-111.node +0 -0
- package/prebuilds/linuxmusl-x64/node-115.node +0 -0
- package/prebuilds/linuxmusl-x64/node-120.node +0 -0
- package/prebuilds/linuxmusl-x64/node-83.node +0 -0
- package/prebuilds/linuxmusl-x64/node-88.node +0 -0
- package/prebuilds/linuxmusl-x64/node-93.node +0 -0
- package/prebuilds/win32-ia32/node-102.node +0 -0
- package/prebuilds/win32-ia32/node-83.node +0 -0
- package/prebuilds/win32-ia32/node-88.node +0 -0
- package/prebuilds/win32-ia32/node-93.node +0 -0
- package/prebuilds/win32-x64/node-102.node +0 -0
- package/prebuilds/win32-x64/node-108.node +0 -0
- package/prebuilds/win32-x64/node-111.node +0 -0
- package/prebuilds/win32-x64/node-115.node +0 -0
- package/prebuilds/win32-x64/node-120.node +0 -0
- package/prebuilds/win32-x64/node-83.node +0 -0
- package/prebuilds/win32-x64/node-88.node +0 -0
- package/prebuilds/win32-x64/node-93.node +0 -0
package/README.md
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
[pprof][pprof-url] support for Node.js.
|
|
8
8
|
|
|
9
9
|
## Prerequisites
|
|
10
|
-
1. Your application will need to be using Node.js
|
|
10
|
+
1. Your application will need to be using Node.js 16 or greater.
|
|
11
11
|
|
|
12
|
-
2. The `pprof` module has a native component that is used to collect profiles
|
|
12
|
+
2. The `pprof` module has a native component that is used to collect profiles
|
|
13
13
|
with v8's CPU and Heap profilers. You may need to install additional
|
|
14
14
|
dependencies to build this module.
|
|
15
|
-
*
|
|
16
|
-
Alpine Linux x64, macOS arm64/x64,
|
|
15
|
+
* `pprof` has prebuilt binaries available for Linux arm64/x64,
|
|
16
|
+
Alpine Linux x64, macOS arm64/x64, and Windows x64 for Node 16/18/20/22/23.
|
|
17
17
|
No additional dependencies are required.
|
|
18
18
|
* For other environments: on environments that `pprof` does not have
|
|
19
19
|
prebuilt binaries for, the module
|
|
@@ -42,7 +42,7 @@ Install [`pprof`][npm-url] with `npm` or add to your `package.json`.
|
|
|
42
42
|
1. Update code to collect and save a profile:
|
|
43
43
|
```javascript
|
|
44
44
|
const profile = await pprof.time.profile({
|
|
45
|
-
durationMillis: 10000, // time in milliseconds for which to
|
|
45
|
+
durationMillis: 10000, // time in milliseconds for which to
|
|
46
46
|
// collect profile.
|
|
47
47
|
});
|
|
48
48
|
const buf = await pprof.encode(profile);
|
|
@@ -63,8 +63,8 @@ Install [`pprof`][npm-url] with `npm` or add to your `package.json`.
|
|
|
63
63
|
node --require @datadog/pprof app.js
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
2. A wall time profile for the job will be saved in
|
|
67
|
-
`pprof-profile-${process.pid}.pb.gz`. View the profile with command line
|
|
66
|
+
2. A wall time profile for the job will be saved in
|
|
67
|
+
`pprof-profile-${process.pid}.pb.gz`. View the profile with command line
|
|
68
68
|
[`pprof`][pprof-url]:
|
|
69
69
|
```sh
|
|
70
70
|
pprof -http=: pprof-profile-${process.pid}.pb.gz
|
|
@@ -79,10 +79,10 @@ Install [`pprof`][npm-url] with `npm` or add to your `package.json`.
|
|
|
79
79
|
// The maximum stack depth for samples collected.
|
|
80
80
|
const stackDepth = 64;
|
|
81
81
|
|
|
82
|
-
heap.start(intervalBytes, stackDepth);
|
|
82
|
+
heap.start(intervalBytes, stackDepth);
|
|
83
83
|
```
|
|
84
84
|
2. Collect heap profiles:
|
|
85
|
-
|
|
85
|
+
|
|
86
86
|
* Collecting and saving a profile in profile.proto format:
|
|
87
87
|
```javascript
|
|
88
88
|
const profile = await pprof.heap.profile();
|
|
@@ -96,11 +96,11 @@ Install [`pprof`][npm-url] with `npm` or add to your `package.json`.
|
|
|
96
96
|
```sh
|
|
97
97
|
pprof -http=: heap.pb.gz
|
|
98
98
|
```
|
|
99
|
-
|
|
99
|
+
|
|
100
100
|
* Collecting a heap profile with V8 allocation profile format:
|
|
101
101
|
```javascript
|
|
102
102
|
const profile = await pprof.heap.v8Profile();
|
|
103
|
-
```
|
|
103
|
+
```
|
|
104
104
|
|
|
105
105
|
[build-image]: https://github.com/Datadog/pprof-nodejs/actions/workflows/build.yml/badge.svg?branch=main
|
|
106
106
|
[build-url]: https://github.com/Datadog/pprof-nodejs/actions/workflows/build.yml
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/pprof",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "pprof support for Node.js",
|
|
5
5
|
"repository": "datadog/pprof-nodejs",
|
|
6
6
|
"main": "out/src/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test:js-tsan": "LD_PRELOAD=`gcc -print-file-name=libtsan.so` mocha out/test/test-*.js",
|
|
27
27
|
"test:js-valgrind": "valgrind --leak-check=full mocha out/test/test-*.js",
|
|
28
28
|
"test:js": "nyc mocha -r source-map-support/register out/test/test-*.js",
|
|
29
|
-
"test": "npm run test:js
|
|
29
|
+
"test": "npm run test:js"
|
|
30
30
|
},
|
|
31
31
|
"author": {
|
|
32
32
|
"name": "Google Inc."
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/mocha": "^10.0.1",
|
|
44
|
-
"@types/node": ">=
|
|
44
|
+
"@types/node": ">=16",
|
|
45
45
|
"@types/sinon": "^10.0.15",
|
|
46
46
|
"@types/tmp": "^0.2.3",
|
|
47
47
|
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"gts": "^4.0.1",
|
|
56
56
|
"js-green-licenses": "^4.0.0",
|
|
57
57
|
"mocha": "^10.2.0",
|
|
58
|
-
"nan": "^2.
|
|
58
|
+
"nan": "^2.22.0",
|
|
59
59
|
"nyc": "^15.1.0",
|
|
60
60
|
"sinon": "^15.2.0",
|
|
61
61
|
"source-map-support": "^0.5.21",
|
|
@@ -82,6 +82,6 @@
|
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
|
-
"node": ">=
|
|
85
|
+
"node": ">=16"
|
|
86
86
|
}
|
|
87
87
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|