@datadog/pprof 0.4.0 → 1.0.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/out/src/cpu-profiler-bindings.d.ts +1 -0
- package/out/src/cpu-profiler-bindings.js +23 -0
- package/out/src/cpu-profiler-bindings.js.map +1 -0
- package/out/src/cpu-profiler.d.ts +19 -0
- package/out/src/cpu-profiler.js +94 -0
- package/out/src/cpu-profiler.js.map +1 -0
- package/out/src/heap-profiler.js +4 -4
- package/out/src/heap-profiler.js.map +1 -1
- package/out/src/index.d.ts +2 -0
- package/out/src/index.js +5 -3
- package/out/src/index.js.map +1 -1
- package/out/src/profile-encoder.js +4 -15
- package/out/src/profile-encoder.js.map +1 -1
- package/out/src/profile-serializer.d.ts +9 -1
- package/out/src/profile-serializer.js +73 -1
- package/out/src/profile-serializer.js.map +1 -1
- package/out/src/sourcemapper/sourcemapper.js +71 -88
- package/out/src/sourcemapper/sourcemapper.js.map +1 -1
- package/out/src/time-profiler-bindings.js +1 -1
- package/out/src/time-profiler-bindings.js.map +1 -1
- package/out/src/time-profiler.js +6 -17
- package/out/src/time-profiler.js.map +1 -1
- package/out/src/v8-types.d.ts +38 -0
- package/out/third_party/cloud-debug-nodejs/src/agent/io/scanner.js +6 -17
- package/out/third_party/cloud-debug-nodejs/src/agent/io/scanner.js.map +1 -1
- package/package.json +25 -30
- package/prebuilds/darwin-arm64/node-102.node +0 -0
- package/prebuilds/darwin-arm64/node-108.node +0 -0
- package/prebuilds/darwin-arm64/node-72.node +0 -0
- package/prebuilds/darwin-arm64/node-79.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-ia32/node-102.node +0 -0
- package/prebuilds/darwin-ia32/node-108.node +0 -0
- package/prebuilds/darwin-ia32/node-72.node +0 -0
- package/prebuilds/darwin-ia32/node-79.node +0 -0
- package/prebuilds/darwin-ia32/node-83.node +0 -0
- package/prebuilds/darwin-ia32/node-88.node +0 -0
- package/prebuilds/darwin-ia32/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-72.node +0 -0
- package/prebuilds/darwin-x64/node-79.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-ia32/node-72.node +0 -0
- package/prebuilds/linux-ia32/node-79.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-72.node +0 -0
- package/prebuilds/linux-x64/node-79.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/win32-ia32/node-102.node +0 -0
- package/prebuilds/win32-ia32/node-72.node +0 -0
- package/prebuilds/win32-ia32/node-79.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-72.node +0 -0
- package/prebuilds/win32-x64/node-79.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/scripts/require-package-json.js +11 -11
- package/binding.gyp +0 -40
- package/bindings/profiler.cc +0 -406
- package/scripts/preinstall.js +0 -36
- package/scripts/should_rebuild.js +0 -8
|
@@ -14,15 +14,6 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
18
|
exports.SourceMapper = void 0;
|
|
28
19
|
// Originally copied from cloud-debug-nodejs's sourcemapper.ts from
|
|
@@ -55,51 +46,49 @@ const MAP_EXT = '.map';
|
|
|
55
46
|
* path should be relative to the process's current working directory
|
|
56
47
|
* @private
|
|
57
48
|
*/
|
|
58
|
-
function processSourceMap(infoMap, mapPath) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
infoMap.set(generatedPath, { mapFileDir: dir, mapConsumer: consumer });
|
|
102
|
-
});
|
|
49
|
+
async function processSourceMap(infoMap, mapPath) {
|
|
50
|
+
// this handles the case when the path is undefined, null, or
|
|
51
|
+
// the empty string
|
|
52
|
+
if (!mapPath || !mapPath.endsWith(MAP_EXT)) {
|
|
53
|
+
throw new Error(`The path "${mapPath}" does not specify a source map file`);
|
|
54
|
+
}
|
|
55
|
+
mapPath = path.normalize(mapPath);
|
|
56
|
+
let contents;
|
|
57
|
+
try {
|
|
58
|
+
contents = await readFile(mapPath, 'utf8');
|
|
59
|
+
}
|
|
60
|
+
catch (e) {
|
|
61
|
+
throw new Error('Could not read source map file ' + mapPath + ': ' + e);
|
|
62
|
+
}
|
|
63
|
+
let consumer;
|
|
64
|
+
try {
|
|
65
|
+
// TODO: Determine how to reconsile the type conflict where `consumer`
|
|
66
|
+
// is constructed as a SourceMapConsumer but is used as a
|
|
67
|
+
// RawSourceMap.
|
|
68
|
+
// TODO: Resolve the cast of `contents as any` (This is needed because the
|
|
69
|
+
// type is expected to be of `RawSourceMap` but the existing
|
|
70
|
+
// working code uses a string.)
|
|
71
|
+
consumer = (await new sourceMap.SourceMapConsumer(contents));
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
throw new Error('An error occurred while reading the ' +
|
|
75
|
+
'sourceMap file ' +
|
|
76
|
+
mapPath +
|
|
77
|
+
': ' +
|
|
78
|
+
e);
|
|
79
|
+
}
|
|
80
|
+
/*
|
|
81
|
+
* If the source map file defines a "file" attribute, use it as
|
|
82
|
+
* the output file where the path is relative to the directory
|
|
83
|
+
* containing the map file. Otherwise, use the name of the output
|
|
84
|
+
* file (with the .map extension removed) as the output file.
|
|
85
|
+
*/
|
|
86
|
+
const dir = path.dirname(mapPath);
|
|
87
|
+
const generatedBase = consumer.file
|
|
88
|
+
? consumer.file
|
|
89
|
+
: path.basename(mapPath, MAP_EXT);
|
|
90
|
+
const generatedPath = path.resolve(dir, generatedBase);
|
|
91
|
+
infoMap.set(generatedPath, { mapFileDir: dir, mapConsumer: consumer });
|
|
103
92
|
}
|
|
104
93
|
class SourceMapper {
|
|
105
94
|
/**
|
|
@@ -113,22 +102,20 @@ class SourceMapper {
|
|
|
113
102
|
constructor() {
|
|
114
103
|
this.infoMap = new Map();
|
|
115
104
|
}
|
|
116
|
-
static create(searchDirs) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
catch (e) {
|
|
127
|
-
throw new Error(`failed to get source maps from ${dir}: ${e}`);
|
|
128
|
-
}
|
|
105
|
+
static async create(searchDirs) {
|
|
106
|
+
const mapFiles = [];
|
|
107
|
+
for (const dir of searchDirs) {
|
|
108
|
+
try {
|
|
109
|
+
const mf = await getMapFiles(dir);
|
|
110
|
+
mf.forEach(mapFile => {
|
|
111
|
+
mapFiles.push(path.resolve(dir, mapFile));
|
|
112
|
+
});
|
|
129
113
|
}
|
|
130
|
-
|
|
131
|
-
|
|
114
|
+
catch (e) {
|
|
115
|
+
throw new Error(`failed to get source maps from ${dir}: ${e}`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return createFromMapFiles(mapFiles);
|
|
132
119
|
}
|
|
133
120
|
/**
|
|
134
121
|
* Used to get the information about the transpiled file from a given input
|
|
@@ -204,25 +191,21 @@ class SourceMapper {
|
|
|
204
191
|
}
|
|
205
192
|
}
|
|
206
193
|
exports.SourceMapper = SourceMapper;
|
|
207
|
-
function createFromMapFiles(mapFiles) {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return mapper;
|
|
219
|
-
});
|
|
194
|
+
async function createFromMapFiles(mapFiles) {
|
|
195
|
+
const limit = pLimit(CONCURRENCY);
|
|
196
|
+
const mapper = new SourceMapper();
|
|
197
|
+
const promises = mapFiles.map(mapPath => limit(() => processSourceMap(mapper.infoMap, mapPath)));
|
|
198
|
+
try {
|
|
199
|
+
await Promise.all(promises);
|
|
200
|
+
}
|
|
201
|
+
catch (err) {
|
|
202
|
+
throw new Error('An error occurred while processing the source map files' + err);
|
|
203
|
+
}
|
|
204
|
+
return mapper;
|
|
220
205
|
}
|
|
221
|
-
function getMapFiles(baseDir) {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
return mapFiles;
|
|
226
|
-
});
|
|
206
|
+
async function getMapFiles(baseDir) {
|
|
207
|
+
const fileStats = await scanner.scan(false, baseDir, /.js.map$/);
|
|
208
|
+
const mapFiles = fileStats.selectFiles(/.js.map$/, process.cwd());
|
|
209
|
+
return mapFiles;
|
|
227
210
|
}
|
|
228
211
|
//# sourceMappingURL=sourcemapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourcemapper.js","sourceRoot":"","sources":["../../../ts/src/sourcemapper/sourcemapper.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"sourcemapper.js","sourceRoot":"","sources":["../../../ts/src/sourcemapper/sourcemapper.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,mEAAmE;AACnE,8HAA8H;AAC9H,8EAA8E;AAC9E,0BAA0B;AAE1B,yBAAyB;AACzB,6BAA6B;AAE7B,2EAA2E;AAC3E,0EAA0E;AAC1E,uEAAuE;AACvE,MAAM,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAClE,6DAA6D;AAC7D,aAAa;AACb,OAAO,UAAU,CAAC,KAAK,CAAC;AACxB,wCAAwC;AACxC,IAAI,IAAI,EAAE;IACR,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;CAClD;AAED,qFAAqF;AAErF,MAAM,IAAI,GAAG,OAAO,CAAC,MA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,GAAG,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CACvD,CAAC;IACF,IAAI;QACF,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,IAAI,KAAK,CACb,yDAAyD,GAAG,GAAG,CAChE,CAAC;KACH;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,OAAe;IACxC,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAClE,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -18,6 +18,6 @@ exports.TimeProfiler = void 0;
|
|
|
18
18
|
*/
|
|
19
19
|
const path_1 = require("path");
|
|
20
20
|
const findBinding = require('node-gyp-build');
|
|
21
|
-
const profiler = findBinding(path_1.join(__dirname, '..', '..'));
|
|
21
|
+
const profiler = findBinding((0, path_1.join)(__dirname, '..', '..'));
|
|
22
22
|
exports.TimeProfiler = profiler.TimeProfiler;
|
|
23
23
|
//# sourceMappingURL=time-profiler-bindings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-profiler-bindings.js","sourceRoot":"","sources":["../../ts/src/time-profiler-bindings.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,+BAA0B;AAE1B,MAAM,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,WAAI,
|
|
1
|
+
{"version":3,"file":"time-profiler-bindings.js","sourceRoot":"","sources":["../../ts/src/time-profiler-bindings.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,+BAA0B;AAE1B,MAAM,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAE7C,QAAA,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC"}
|
package/out/src/time-profiler.js
CHANGED
|
@@ -14,15 +14,6 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
18
|
exports.start = exports.profile = void 0;
|
|
28
19
|
const delay_1 = require("delay");
|
|
@@ -30,12 +21,10 @@ const profile_serializer_1 = require("./profile-serializer");
|
|
|
30
21
|
const time_profiler_bindings_1 = require("./time-profiler-bindings");
|
|
31
22
|
const DEFAULT_INTERVAL_MICROS = 1000;
|
|
32
23
|
const majorVersion = process.version.slice(1).split('.').map(Number)[0];
|
|
33
|
-
function profile(options) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return stop();
|
|
38
|
-
});
|
|
24
|
+
async function profile(options) {
|
|
25
|
+
const stop = start(options.intervalMicros || DEFAULT_INTERVAL_MICROS, options.name, options.sourceMapper, options.lineNumbers);
|
|
26
|
+
await (0, delay_1.default)(options.durationMillis);
|
|
27
|
+
return stop();
|
|
39
28
|
}
|
|
40
29
|
exports.profile = profile;
|
|
41
30
|
function ensureRunName(name) {
|
|
@@ -60,7 +49,7 @@ function start(intervalMicros = DEFAULT_INTERVAL_MICROS, name, sourceMapper, lin
|
|
|
60
49
|
if (restart) {
|
|
61
50
|
runName = start();
|
|
62
51
|
}
|
|
63
|
-
return profile_serializer_1.serializeTimeProfile(result, intervalMicros, sourceMapper);
|
|
52
|
+
return (0, profile_serializer_1.serializeTimeProfile)(result, intervalMicros, sourceMapper);
|
|
64
53
|
}
|
|
65
54
|
// For Node.js v16+, we want to start the next profile before we stop the
|
|
66
55
|
// current one as otherwise the active profile count could reach zero which
|
|
@@ -76,7 +65,7 @@ function start(intervalMicros = DEFAULT_INTERVAL_MICROS, name, sourceMapper, lin
|
|
|
76
65
|
}
|
|
77
66
|
if (!restart)
|
|
78
67
|
profiler.dispose();
|
|
79
|
-
return profile_serializer_1.serializeTimeProfile(result, intervalMicros, sourceMapper);
|
|
68
|
+
return (0, profile_serializer_1.serializeTimeProfile)(result, intervalMicros, sourceMapper);
|
|
80
69
|
}
|
|
81
70
|
}
|
|
82
71
|
exports.start = start;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-profiler.js","sourceRoot":"","sources":["../../ts/src/time-profiler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"time-profiler.js","sourceRoot":"","sources":["../../ts/src/time-profiler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,iCAA0B;AAE1B,6DAA0D;AAE1D,qEAAsD;AAEtD,MAAM,uBAAuB,GAAiB,IAAI,CAAC;AAEnD,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,C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AC,MAAM,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;IACpE,CAAC;IAED,yEAAyE;IACzE,2EAA2E;IAC3E,6EAA6E;IAC7E,SAAS,IAAI,CAAC,OAAO,GAAG,KAAK;QAC3B,IAAI,WAAW,CAAC;QAChB,IAAI,OAAO,EAAE;YACX,WAAW,GAAG,KAAK,EAAE,CAAC;SACvB;QACD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACnD,IAAI,WAAW,EAAE;YACf,OAAO,GAAG,WAAW,CAAC;SACvB;QACD,IAAI,CAAC,OAAO;YAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;QACjC,OAAO,IAAA,yCAAoB,EAAC,MAAM,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;IACpE,CAAC;AACH,CAAC;AA3CD,sBA2CC"}
|
package/out/src/v8-types.d.ts
CHANGED
|
@@ -38,3 +38,41 @@ export interface Allocation {
|
|
|
38
38
|
sizeBytes: number;
|
|
39
39
|
count: number;
|
|
40
40
|
}
|
|
41
|
+
export interface InitialCpuProfile {
|
|
42
|
+
/** Time in nanoseconds at which profile was stopped. */
|
|
43
|
+
endTime: number;
|
|
44
|
+
samples: CpuProfileSample[];
|
|
45
|
+
/** Time in nanoseconds at which profile was started. */
|
|
46
|
+
startTime: number;
|
|
47
|
+
}
|
|
48
|
+
export interface CpuProfile {
|
|
49
|
+
/** Time in nanoseconds at which profile was stopped. */
|
|
50
|
+
endTime: number;
|
|
51
|
+
topDownRoot: CpuProfileNode;
|
|
52
|
+
/** Time in nanoseconds at which profile was started. */
|
|
53
|
+
startTime: number;
|
|
54
|
+
}
|
|
55
|
+
export interface LabelSet {
|
|
56
|
+
[key: string]: string | number;
|
|
57
|
+
}
|
|
58
|
+
export interface CpuProfileNode extends ProfileNode {
|
|
59
|
+
hitCount: number;
|
|
60
|
+
cpuTime: number;
|
|
61
|
+
labelSets: LabelSet[];
|
|
62
|
+
}
|
|
63
|
+
export interface CpuProfileSample {
|
|
64
|
+
labels: LabelSet;
|
|
65
|
+
locations: CodeEvent[];
|
|
66
|
+
cpuTime: number;
|
|
67
|
+
}
|
|
68
|
+
export interface CodeEvent {
|
|
69
|
+
address: number;
|
|
70
|
+
previousAddress?: number;
|
|
71
|
+
size: number;
|
|
72
|
+
comment?: string;
|
|
73
|
+
functionName?: string;
|
|
74
|
+
scriptName?: string;
|
|
75
|
+
scriptId: number;
|
|
76
|
+
line: number;
|
|
77
|
+
column: number;
|
|
78
|
+
}
|
|
@@ -14,15 +14,6 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
18
|
exports.scan = void 0;
|
|
28
19
|
const crypto = require("crypto");
|
|
@@ -84,11 +75,9 @@ class ScanResultsImpl {
|
|
|
84
75
|
});
|
|
85
76
|
}
|
|
86
77
|
}
|
|
87
|
-
function scan(shouldHash, baseDir, regex) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return computeStats(fileList, shouldHash);
|
|
91
|
-
});
|
|
78
|
+
async function scan(shouldHash, baseDir, regex) {
|
|
79
|
+
const fileList = await findFiles(baseDir, regex);
|
|
80
|
+
return computeStats(fileList, shouldHash);
|
|
92
81
|
}
|
|
93
82
|
exports.scan = scan;
|
|
94
83
|
/**
|
|
@@ -104,7 +93,7 @@ exports.scan = scan;
|
|
|
104
93
|
// call signature
|
|
105
94
|
function computeStats(fileList, shouldHash) {
|
|
106
95
|
// eslint-disable-next-line no-async-promise-executor
|
|
107
|
-
return new Promise((resolve) =>
|
|
96
|
+
return new Promise(async (resolve) => {
|
|
108
97
|
// return a valid, if fake, result when there are no js files to hash.
|
|
109
98
|
if (fileList.length === 0) {
|
|
110
99
|
resolve(new ScanResultsImpl({}, new Map(), 'EMPTY-no-js-files'));
|
|
@@ -116,7 +105,7 @@ function computeStats(fileList, shouldHash) {
|
|
|
116
105
|
const errors = new Map();
|
|
117
106
|
for (const filename of fileList) {
|
|
118
107
|
try {
|
|
119
|
-
const fileStats =
|
|
108
|
+
const fileStats = await statsForFile(filename, shouldHash);
|
|
120
109
|
if (shouldHash) {
|
|
121
110
|
hashes.push(fileStats.hash);
|
|
122
111
|
}
|
|
@@ -135,7 +124,7 @@ function computeStats(fileList, shouldHash) {
|
|
|
135
124
|
hash = 'SHA1-' + sha1;
|
|
136
125
|
}
|
|
137
126
|
resolve(new ScanResultsImpl(statistics, errors, hash));
|
|
138
|
-
})
|
|
127
|
+
});
|
|
139
128
|
}
|
|
140
129
|
/**
|
|
141
130
|
* Given a base-directory, this function scans the subtree and finds all the js
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../../../../../ts/third_party/cloud-debug-nodejs/src/agent/io/scanner.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../../../../../ts/third_party/cloud-debug-nodejs/src/agent/io/scanner.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,iCAAiC;AAEjC,yBAAyB;AACzB,6BAA6B;AAE7B,gCAAgC;AAChC,MAAM,MAAM,GAAyC,OAAO,CAA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C,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,33 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/pprof",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "pprof support for Node.js",
|
|
5
5
|
"repository": "datadog/pprof-nodejs",
|
|
6
6
|
"main": "out/src/index.js",
|
|
7
7
|
"types": "out/src/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"preinstall": "node scripts/preinstall.js",
|
|
10
|
-
"install": "(node scripts/should_rebuild && node-gyp-build) || exit 0",
|
|
11
9
|
"rebuild": "node-gyp rebuild --jobs=max",
|
|
12
|
-
"test": "nyc mocha out/test/test-*.js",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
10
|
+
"test:js": "nyc mocha out/test/test-*.js",
|
|
11
|
+
"test:cpp": "node scripts/cctest.js",
|
|
12
|
+
"test": "npm run test:js && npm run test:cpp",
|
|
15
13
|
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json",
|
|
16
14
|
"compile": "tsc -p .",
|
|
17
15
|
"fix": "gts fix",
|
|
18
|
-
"lint": "gts check",
|
|
19
|
-
"docs": "echo 'no docs yet'",
|
|
16
|
+
"lint": "jsgl --local . && gts check",
|
|
20
17
|
"prebuild": "node scripts/prebuild.js",
|
|
21
18
|
"prebuilds": "node scripts/prebuilds.js",
|
|
22
19
|
"prepare": "npm run compile",
|
|
23
20
|
"prepublishOnly": "node scripts/prepublish.js",
|
|
24
21
|
"pretest": "npm run compile && npm run rebuild",
|
|
25
|
-
"posttest": "npm run license-check",
|
|
26
22
|
"proto": "npm run proto:profile",
|
|
27
|
-
"proto:profile": "mkdir -p proto && pbjs -t static-module -w commonjs -o proto/profile.js third_party/proto/profile.proto && pbts -o proto/profile.d.ts proto/profile.js"
|
|
28
|
-
"license-check": "jsgl --local .",
|
|
29
|
-
"docs-test": "linkinator docs -r --skip www.googleapis.com",
|
|
30
|
-
"predocs-test": "npm run docs"
|
|
23
|
+
"proto:profile": "mkdir -p proto && pbjs -t static-module -w commonjs -o proto/profile.js third_party/proto/profile.proto && pbts -o proto/profile.d.ts proto/profile.js"
|
|
31
24
|
},
|
|
32
25
|
"author": {
|
|
33
26
|
"name": "Google Inc."
|
|
@@ -36,51 +29,53 @@
|
|
|
36
29
|
"dependencies": {
|
|
37
30
|
"delay": "^5.0.0",
|
|
38
31
|
"findit2": "^2.2.3",
|
|
39
|
-
"nan": "^2.
|
|
32
|
+
"nan": "^2.16.0",
|
|
40
33
|
"node-gyp-build": "^3.9.0",
|
|
41
|
-
"p-limit": "^3.
|
|
34
|
+
"p-limit": "^3.1.0",
|
|
42
35
|
"pify": "^5.0.0",
|
|
43
|
-
"protobufjs": "
|
|
36
|
+
"protobufjs": "^7.0.0",
|
|
44
37
|
"rimraf": "^3.0.2",
|
|
45
38
|
"semver": "^7.3.5",
|
|
46
39
|
"source-map": "^0.7.3",
|
|
47
40
|
"split": "^1.0.1"
|
|
48
41
|
},
|
|
49
42
|
"devDependencies": {
|
|
50
|
-
"@types/mocha": "^
|
|
51
|
-
"@types/node": "^
|
|
43
|
+
"@types/mocha": "^9.1.1",
|
|
44
|
+
"@types/node": "^18.0.6",
|
|
52
45
|
"@types/p-limit": "^2.0.0",
|
|
53
46
|
"@types/pify": "^5.0.0",
|
|
54
|
-
"@types/pretty-ms": "^
|
|
47
|
+
"@types/pretty-ms": "^5.0.1",
|
|
55
48
|
"@types/request": "^2.47.1",
|
|
56
49
|
"@types/sinon": "^10.0.0",
|
|
57
|
-
"@types/tmp": "0.2.
|
|
58
|
-
"axios": "^0.
|
|
59
|
-
"checksum": "^0.
|
|
50
|
+
"@types/tmp": "^0.2.3",
|
|
51
|
+
"axios": "^0.27.2",
|
|
52
|
+
"checksum": "^1.0.0",
|
|
60
53
|
"codecov": "^3.0.0",
|
|
61
54
|
"deep-copy": "^1.4.2",
|
|
62
|
-
"
|
|
55
|
+
"eslint-config-standard": "^17.0.0",
|
|
56
|
+
"eslint-plugin-import": "^2.26.0",
|
|
57
|
+
"eslint-plugin-n": "^15.2.0",
|
|
58
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
59
|
+
"glob": "^8.0.3",
|
|
63
60
|
"gts": "^3.0.0",
|
|
64
61
|
"js-green-licenses": "^3.0.0",
|
|
65
|
-
"linkinator": "^
|
|
62
|
+
"linkinator": "^4.0.2",
|
|
66
63
|
"mkdirp": "^1.0.4",
|
|
67
|
-
"mocha": "^
|
|
64
|
+
"mocha": "^9.2.2",
|
|
68
65
|
"nyc": "^15.0.0",
|
|
69
66
|
"rimraf": "^3.0.2",
|
|
70
67
|
"semver": "^7.3.5",
|
|
71
|
-
"sinon": "^
|
|
68
|
+
"sinon": "^14.0.0",
|
|
72
69
|
"source-map-support": "^0.5.12",
|
|
73
70
|
"tar": "^6.1.0",
|
|
74
71
|
"tmp": "0.2.1",
|
|
75
72
|
"ts-mockito": "^2.2.5",
|
|
76
|
-
"typescript": "
|
|
73
|
+
"typescript": "^4.7.4"
|
|
77
74
|
},
|
|
78
75
|
"files": [
|
|
79
76
|
"out/src",
|
|
80
77
|
"out/third_party/cloud-debug-nodejs",
|
|
81
|
-
"bindings",
|
|
82
78
|
"proto",
|
|
83
|
-
"binding.gyp",
|
|
84
79
|
"package-lock.json",
|
|
85
80
|
"package.json",
|
|
86
81
|
"README.md",
|
|
@@ -97,6 +92,6 @@
|
|
|
97
92
|
]
|
|
98
93
|
},
|
|
99
94
|
"engines": {
|
|
100
|
-
"node": ">=12
|
|
95
|
+
"node": ">=12"
|
|
101
96
|
}
|
|
102
97
|
}
|
|
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
|