@datadog/pprof 6.0.0-pre-2f6f2f8 → 6.0.0-pre-3ce3e95
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 +6 -7
- package/out/src/index.d.ts +1 -0
- package/out/src/time-profiler.d.ts +2 -0
- package/out/src/time-profiler.js +5 -3
- package/out/src/time-profiler.js.map +1 -1
- package/package.json +2 -1
- 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-127.node +0 -0
- package/prebuilds/darwin-arm64/node-131.node +0 -0
- package/prebuilds/darwin-arm64/node-137.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-127.node +0 -0
- package/prebuilds/darwin-x64/node-131.node +0 -0
- package/prebuilds/darwin-x64/node-137.node +0 -0
- package/prebuilds/linuxglibc-arm64/node-108.node +0 -0
- package/prebuilds/linuxglibc-arm64/node-111.node +0 -0
- package/prebuilds/linuxglibc-arm64/node-115.node +0 -0
- package/prebuilds/linuxglibc-arm64/node-120.node +0 -0
- package/prebuilds/linuxglibc-arm64/node-127.node +0 -0
- package/prebuilds/linuxglibc-arm64/node-131.node +0 -0
- package/prebuilds/linuxglibc-arm64/node-137.node +0 -0
- package/prebuilds/linuxglibc-x64/node-108.node +0 -0
- package/prebuilds/linuxglibc-x64/node-111.node +0 -0
- package/prebuilds/linuxglibc-x64/node-115.node +0 -0
- package/prebuilds/linuxglibc-x64/node-120.node +0 -0
- package/prebuilds/linuxglibc-x64/node-127.node +0 -0
- package/prebuilds/linuxglibc-x64/node-131.node +0 -0
- package/prebuilds/linuxglibc-x64/node-137.node +0 -0
- package/prebuilds/linuxmusl-arm64/node-108.node +0 -0
- package/prebuilds/linuxmusl-arm64/node-111.node +0 -0
- package/prebuilds/linuxmusl-arm64/node-115.node +0 -0
- package/prebuilds/linuxmusl-arm64/node-120.node +0 -0
- package/prebuilds/linuxmusl-arm64/node-127.node +0 -0
- package/prebuilds/linuxmusl-arm64/node-131.node +0 -0
- package/prebuilds/linuxmusl-arm64/node-137.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-127.node +0 -0
- package/prebuilds/linuxmusl-x64/node-131.node +0 -0
- package/prebuilds/linuxmusl-x64/node-137.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-127.node +0 -0
- package/prebuilds/win32-x64/node-131.node +0 -0
- package/prebuilds/win32-x64/node-137.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 18 or greater.
|
|
11
11
|
|
|
12
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
15
|
* `pprof` has prebuilt binaries available for Linux arm64/x64,
|
|
16
|
-
Alpine Linux x64, macOS arm64/x64, and Windows x64 for Node
|
|
16
|
+
Alpine Linux x64, macOS arm64/x64, and Windows x64 for Node 18/20/22/24.
|
|
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
|
|
@@ -104,10 +104,9 @@ Install [`pprof`][npm-url] with `npm` or add to your `package.json`.
|
|
|
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
|
|
107
|
-
[
|
|
108
|
-
[npm-
|
|
109
|
-
[npm-url]: https://npmjs.org/package/pprof
|
|
107
|
+
[npm-image]: https://badge.fury.io/js/@datadog%2Fpprof.svg
|
|
108
|
+
[npm-url]: https://npmjs.org/package/@datadog/pprof
|
|
110
109
|
[pprof-url]: https://github.com/google/pprof
|
|
111
110
|
[pprof-install-url]: https://github.com/google/pprof#building-pprof
|
|
112
|
-
[snyk-image]: https://snyk.io/test/github/
|
|
113
|
-
[snyk-url]: https://snyk.io/test/github/
|
|
111
|
+
[snyk-image]: https://snyk.io/test/github/Datadog/pprof-nodejs/badge.svg
|
|
112
|
+
[snyk-url]: https://snyk.io/test/github/Datadog/pprof-nodejs
|
package/out/src/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export interface TimeProfilerOptions {
|
|
|
35
35
|
workaroundV8Bug?: boolean;
|
|
36
36
|
collectCpuTime?: boolean;
|
|
37
37
|
collectAsyncId?: boolean;
|
|
38
|
+
useCPED?: boolean;
|
|
38
39
|
}
|
|
39
40
|
export declare function profile(options?: TimeProfilerOptions): Promise<import("pprof-format").Profile>;
|
|
40
41
|
export declare function start(options?: TimeProfilerOptions): void;
|
|
@@ -46,6 +47,7 @@ export declare function isStarted(): boolean;
|
|
|
46
47
|
export declare function v8ProfilerStuckEventLoopDetected(): number;
|
|
47
48
|
export declare const constants: {
|
|
48
49
|
kSampleCount: any;
|
|
50
|
+
kCPEDContextCount: any;
|
|
49
51
|
GARBAGE_COLLECTION_FUNCTION_NAME: string;
|
|
50
52
|
NON_JS_THREADS_FUNCTION_NAME: string;
|
|
51
53
|
};
|
package/out/src/time-profiler.js
CHANGED
|
@@ -24,7 +24,7 @@ const profile_serializer_1 = require("./profile-serializer");
|
|
|
24
24
|
const time_profiler_bindings_1 = require("./time-profiler-bindings");
|
|
25
25
|
Object.defineProperty(exports, "getNativeThreadId", { enumerable: true, get: function () { return time_profiler_bindings_1.getNativeThreadId; } });
|
|
26
26
|
const worker_threads_1 = require("worker_threads");
|
|
27
|
-
const { kSampleCount } = time_profiler_bindings_1.constants;
|
|
27
|
+
const { kSampleCount, kCPEDContextCount } = time_profiler_bindings_1.constants;
|
|
28
28
|
const DEFAULT_INTERVAL_MICROS = 1000;
|
|
29
29
|
const DEFAULT_DURATION_MILLIS = 60000;
|
|
30
30
|
let gProfiler;
|
|
@@ -45,6 +45,7 @@ const DEFAULT_OPTIONS = {
|
|
|
45
45
|
workaroundV8Bug: true,
|
|
46
46
|
collectCpuTime: false,
|
|
47
47
|
collectAsyncId: false,
|
|
48
|
+
useCPED: false,
|
|
48
49
|
};
|
|
49
50
|
async function profile(options = {}) {
|
|
50
51
|
options = { ...DEFAULT_OPTIONS, ...options };
|
|
@@ -64,8 +65,8 @@ function start(options = {}) {
|
|
|
64
65
|
gIntervalMicros = options.intervalMicros;
|
|
65
66
|
gV8ProfilerStuckEventLoopDetected = 0;
|
|
66
67
|
gProfiler.start();
|
|
67
|
-
// If contexts are enabled, set an initial empty context
|
|
68
|
-
if (options.withContexts) {
|
|
68
|
+
// If contexts are enabled without using CPED, set an initial empty context
|
|
69
|
+
if (options.withContexts && !options.useCPED) {
|
|
69
70
|
setContext({});
|
|
70
71
|
}
|
|
71
72
|
}
|
|
@@ -130,6 +131,7 @@ function v8ProfilerStuckEventLoopDetected() {
|
|
|
130
131
|
exports.v8ProfilerStuckEventLoopDetected = v8ProfilerStuckEventLoopDetected;
|
|
131
132
|
exports.constants = {
|
|
132
133
|
kSampleCount,
|
|
134
|
+
kCPEDContextCount,
|
|
133
135
|
GARBAGE_COLLECTION_FUNCTION_NAME: profile_serializer_1.GARBAGE_COLLECTION_FUNCTION_NAME,
|
|
134
136
|
NON_JS_THREADS_FUNCTION_NAME: profile_serializer_1.NON_JS_THREADS_FUNCTION_NAME,
|
|
135
137
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-profiler.js","sourceRoot":"","sources":["../../ts/src/time-profiler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;AAEH,kDAA0B;AAE1B,6DAI8B;AAE9B,qEAIkC;
|
|
1
|
+
{"version":3,"file":"time-profiler.js","sourceRoot":"","sources":["../../ts/src/time-profiler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;AAEH,kDAA0B;AAE1B,6DAI8B;AAE9B,qEAIkC;AA4J1B,kGA9JN,0CAAiB,OA8JM;AA1JzB,mDAA4C;AAE5C,MAAM,EAAC,YAAY,EAAE,iBAAiB,EAAC,GAAG,kCAAiB,CAAC;AAE5D,MAAM,uBAAuB,GAAiB,IAAI,CAAC;AACnD,MAAM,uBAAuB,GAAiB,KAAK,CAAC;AAKpD,IAAI,SAAwD,CAAC;AAC7D,IAAI,aAAuC,CAAC;AAC5C,IAAI,eAA6B,CAAC;AAClC,IAAI,iCAAiC,GAAG,CAAC,CAAC;AAE1C;6DAC6D;AAC7D,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;IACxB,IAAI,SAAS,EAAE;QAAE,IAAI,EAAE,CAAC;AAC1B,CAAC,CAAC,CAAC;AAuBH,MAAM,eAAe,GAAwB;IAC3C,cAAc,EAAE,uBAAuB;IACvC,cAAc,EAAE,uBAAuB;IACvC,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,IAAI;IACrB,cAAc,EAAE,KAAK;IACrB,cAAc,EAAE,KAAK;IACrB,OAAO,EAAE,KAAK;CACf,CAAC;AAEK,KAAK,UAAU,OAAO,CAAC,UAA+B,EAAE;IAC7D,OAA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1
|
{
|
|
2
2
|
"name": "@datadog/pprof",
|
|
3
|
-
"version": "6.0.0-pre-
|
|
3
|
+
"version": "6.0.0-pre-3ce3e95",
|
|
4
4
|
"description": "pprof support for Node.js",
|
|
5
5
|
"repository": "datadog/pprof-nodejs",
|
|
6
6
|
"main": "out/src/index.js",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"mocha": "^10.2.0",
|
|
58
58
|
"nan": "^2.22.2",
|
|
59
59
|
"nyc": "^15.1.0",
|
|
60
|
+
"semver": "^7.7.2",
|
|
60
61
|
"sinon": "^15.2.0",
|
|
61
62
|
"source-map-support": "^0.5.21",
|
|
62
63
|
"tmp": "0.2.1",
|
|
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
|