@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CpuProfiler: any;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CpuProfiler = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright 2018 Google Inc. All Rights Reserved.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
const path_1 = require("path");
|
|
20
|
+
const findBinding = require('node-gyp-build');
|
|
21
|
+
const profiler = findBinding((0, path_1.join)(__dirname, '..', '..'));
|
|
22
|
+
exports.CpuProfiler = profiler.CpuProfiler;
|
|
23
|
+
//# sourceMappingURL=cpu-profiler-bindings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpu-profiler-bindings.js","sourceRoot":"","sources":["../../ts/src/cpu-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,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2017 Google Inc. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { CpuProfiler as NativeCpuProfiler } from './cpu-profiler-bindings';
|
|
17
|
+
export default class CpuProfiler extends NativeCpuProfiler {
|
|
18
|
+
profile(): import("../../proto/profile").perftools.profiles.IProfile | undefined;
|
|
19
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2017 Google Inc. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const profile_serializer_1 = require("./profile-serializer");
|
|
19
|
+
const cpu_profiler_bindings_1 = require("./cpu-profiler-bindings");
|
|
20
|
+
function isNodeEqual(a, b) {
|
|
21
|
+
if (a.name !== b.name)
|
|
22
|
+
return false;
|
|
23
|
+
if (a.scriptName !== b.scriptName)
|
|
24
|
+
return false;
|
|
25
|
+
if (a.scriptId !== b.scriptId)
|
|
26
|
+
return false;
|
|
27
|
+
if (a.lineNumber !== b.lineNumber)
|
|
28
|
+
return false;
|
|
29
|
+
if (a.columnNumber !== b.columnNumber)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function makeNode(location) {
|
|
34
|
+
return {
|
|
35
|
+
name: location.comment || location.functionName,
|
|
36
|
+
scriptName: location.scriptName || '',
|
|
37
|
+
scriptId: location.scriptId,
|
|
38
|
+
lineNumber: location.line,
|
|
39
|
+
columnNumber: location.column,
|
|
40
|
+
hitCount: 0,
|
|
41
|
+
cpuTime: 0,
|
|
42
|
+
labelSets: [],
|
|
43
|
+
children: [],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
class CpuProfiler extends cpu_profiler_bindings_1.CpuProfiler {
|
|
47
|
+
profile() {
|
|
48
|
+
if (this.frequency === 0)
|
|
49
|
+
return;
|
|
50
|
+
const profile = super.profile();
|
|
51
|
+
const timeProfile = {
|
|
52
|
+
startTime: profile.startTime,
|
|
53
|
+
endTime: profile.endTime,
|
|
54
|
+
topDownRoot: {
|
|
55
|
+
name: '(root)',
|
|
56
|
+
scriptName: '',
|
|
57
|
+
scriptId: 0,
|
|
58
|
+
lineNumber: 0,
|
|
59
|
+
columnNumber: 0,
|
|
60
|
+
hitCount: 0,
|
|
61
|
+
cpuTime: 0,
|
|
62
|
+
labelSets: [],
|
|
63
|
+
children: [],
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
let targetNode = timeProfile.topDownRoot;
|
|
67
|
+
for (const sample of profile.samples) {
|
|
68
|
+
if (!sample)
|
|
69
|
+
continue;
|
|
70
|
+
locations: for (const location of sample.locations) {
|
|
71
|
+
const node = makeNode(location);
|
|
72
|
+
for (const found of targetNode.children) {
|
|
73
|
+
const foundNode = found;
|
|
74
|
+
if (isNodeEqual(node, foundNode)) {
|
|
75
|
+
targetNode = foundNode;
|
|
76
|
+
continue locations;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
targetNode.children.push(node);
|
|
80
|
+
targetNode = node;
|
|
81
|
+
}
|
|
82
|
+
targetNode.cpuTime += sample.cpuTime;
|
|
83
|
+
targetNode.hitCount++;
|
|
84
|
+
if (sample.labels) {
|
|
85
|
+
targetNode.labelSets.push(sample.labels);
|
|
86
|
+
}
|
|
87
|
+
targetNode = timeProfile.topDownRoot;
|
|
88
|
+
}
|
|
89
|
+
const intervalMicros = 1000 / this.frequency;
|
|
90
|
+
return (0, profile_serializer_1.serializeCpuProfile)(timeProfile, intervalMicros);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.default = CpuProfiler;
|
|
94
|
+
//# sourceMappingURL=cpu-profiler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpu-profiler.js","sourceRoot":"","sources":["../../ts/src/cpu-profiler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,6DAAyD;AACzD,mEAAyE;AAQzE,SAAS,WAAW,CAAC,CAAiB,EAAE,CAAiB;IACvD,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IACpC,IAAI,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAChD,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAChD,IAAI,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC;IACpD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,QAAQ,CAAC,QAAmB;IACnC,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,OA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AAC,EAAE;wBAChC,UAAU,GAAG,SAAS,CAAC;wBACvB,SAAS,SAAS,CAAC;qBACpB;iBACF;gBAED,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC/B,UAAU,GAAG,IAAI,CAAC;aACnB;YAED,UAAU,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC;YACrC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,IAAI,MAAM,CAAC,MAAM,EAAE;gBACjB,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;aAC1C;YAED,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC;SACtC;QAED,MAAM,cAAc,GAAG,IAAI,GAAI,IAAI,CAAC,SAAoB,CAAC;QACzD,OAAO,IAAA,wCAAmB,EAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAC1D,CAAC;CACF;AArDD,8BAqDC"}
|
package/out/src/heap-profiler.js
CHANGED
|
@@ -31,7 +31,7 @@ function v8Profile() {
|
|
|
31
31
|
if (!enabled) {
|
|
32
32
|
throw new Error('Heap profiler is not enabled.');
|
|
33
33
|
}
|
|
34
|
-
return heap_profiler_bindings_1.getAllocationProfile();
|
|
34
|
+
return (0, heap_profiler_bindings_1.getAllocationProfile)();
|
|
35
35
|
}
|
|
36
36
|
exports.v8Profile = v8Profile;
|
|
37
37
|
/**
|
|
@@ -58,7 +58,7 @@ function profile(ignoreSamplePath, sourceMapper) {
|
|
|
58
58
|
};
|
|
59
59
|
result.children.push(externalNode);
|
|
60
60
|
}
|
|
61
|
-
return profile_serializer_1.serializeHeapProfile(result, startTimeNanos, heapIntervalBytes, ignoreSamplePath, sourceMapper);
|
|
61
|
+
return (0, profile_serializer_1.serializeHeapProfile)(result, startTimeNanos, heapIntervalBytes, ignoreSamplePath, sourceMapper);
|
|
62
62
|
}
|
|
63
63
|
exports.profile = profile;
|
|
64
64
|
/**
|
|
@@ -75,7 +75,7 @@ function start(intervalBytes, stackDepth) {
|
|
|
75
75
|
}
|
|
76
76
|
heapIntervalBytes = intervalBytes;
|
|
77
77
|
heapStackDepth = stackDepth;
|
|
78
|
-
heap_profiler_bindings_1.startSamplingHeapProfiler(heapIntervalBytes, heapStackDepth);
|
|
78
|
+
(0, heap_profiler_bindings_1.startSamplingHeapProfiler)(heapIntervalBytes, heapStackDepth);
|
|
79
79
|
enabled = true;
|
|
80
80
|
}
|
|
81
81
|
exports.start = start;
|
|
@@ -83,7 +83,7 @@ exports.start = start;
|
|
|
83
83
|
function stop() {
|
|
84
84
|
if (enabled) {
|
|
85
85
|
enabled = false;
|
|
86
|
-
heap_profiler_bindings_1.stopSamplingHeapProfiler();
|
|
86
|
+
(0, heap_profiler_bindings_1.stopSamplingHeapProfiler)();
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
exports.stop = stop;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heap-profiler.js","sourceRoot":"","sources":["../../ts/src/heap-profiler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,qEAIkC;AAClC,6DAA0D;AAI1D,IAAI,OAAO,GAAG,KAAK,CAAC;AACpB,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAC1B,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB;;;;;GAKG;AACH,SAAgB,SAAS;IACvB,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;KAClD;IACD,OAAO,6CAAoB,
|
|
1
|
+
{"version":3,"file":"heap-profiler.js","sourceRoot":"","sources":["../../ts/src/heap-profiler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,qEAIkC;AAClC,6DAA0D;AAI1D,IAAI,OAAO,GAAG,KAAK,CAAC;AACpB,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAC1B,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB;;;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AAC;AACjB,CAAC;AAVD,sBAUC;AAED,8EAA8E;AAC9E,SAAgB,IAAI;IAClB,IAAI,OAAO,EAAE;QACX,OAAO,GAAG,KAAK,CAAC;QAChB,IAAA,iDAAwB,GAAE,CAAC;KAC5B;AACH,CAAC;AALD,oBAKC"}
|
package/out/src/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import cpuProfiler from './cpu-profiler';
|
|
1
2
|
import * as heapProfiler from './heap-profiler';
|
|
2
3
|
import * as timeProfiler from './time-profiler';
|
|
3
4
|
export { AllocationProfileNode, TimeProfileNode, ProfileNode } from './v8-types';
|
|
4
5
|
export { encode, encodeSync } from './profile-encoder';
|
|
5
6
|
export { SourceMapper } from './sourcemapper/sourcemapper';
|
|
7
|
+
export declare const CpuProfiler: typeof cpuProfiler;
|
|
6
8
|
export declare const time: {
|
|
7
9
|
profile: typeof timeProfiler.profile;
|
|
8
10
|
start: typeof timeProfiler.start;
|
package/out/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.heap = exports.time = exports.SourceMapper = exports.encodeSync = exports.encode = void 0;
|
|
3
|
+
exports.heap = exports.time = exports.CpuProfiler = exports.SourceMapper = exports.encodeSync = exports.encode = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Copyright 2019 Google Inc. All Rights Reserved.
|
|
6
6
|
*
|
|
@@ -17,6 +17,7 @@ exports.heap = exports.time = exports.SourceMapper = exports.encodeSync = export
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
const fs_1 = require("fs");
|
|
20
|
+
const cpu_profiler_1 = require("./cpu-profiler");
|
|
20
21
|
const heapProfiler = require("./heap-profiler");
|
|
21
22
|
const profile_encoder_1 = require("./profile-encoder");
|
|
22
23
|
const timeProfiler = require("./time-profiler");
|
|
@@ -25,6 +26,7 @@ Object.defineProperty(exports, "encode", { enumerable: true, get: function () {
|
|
|
25
26
|
Object.defineProperty(exports, "encodeSync", { enumerable: true, get: function () { return profile_encoder_2.encodeSync; } });
|
|
26
27
|
var sourcemapper_1 = require("./sourcemapper/sourcemapper");
|
|
27
28
|
Object.defineProperty(exports, "SourceMapper", { enumerable: true, get: function () { return sourcemapper_1.SourceMapper; } });
|
|
29
|
+
exports.CpuProfiler = cpu_profiler_1.default;
|
|
28
30
|
exports.time = {
|
|
29
31
|
profile: timeProfiler.profile,
|
|
30
32
|
start: timeProfiler.start,
|
|
@@ -42,8 +44,8 @@ if (module.parent && module.parent.id === 'internal/preload') {
|
|
|
42
44
|
// The process is going to terminate imminently. All work here needs to
|
|
43
45
|
// be synchronous.
|
|
44
46
|
const profile = stop();
|
|
45
|
-
const buffer = profile_encoder_1.encodeSync(profile);
|
|
46
|
-
fs_1.writeFileSync(`pprof-profile-${process.pid}.pb.gz`, buffer);
|
|
47
|
+
const buffer = (0, profile_encoder_1.encodeSync)(profile);
|
|
48
|
+
(0, fs_1.writeFileSync)(`pprof-profile-${process.pid}.pb.gz`, buffer);
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
51
|
//# sourceMappingURL=index.js.map
|
package/out/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/src/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,2BAAiC;AAEjC,gDAAgD;AAChD,uDAA6C;AAC7C,gDAAgD;AAGhD,qDAAqD;AAA7C,yGAAA,MAAM,OAAA;AAAE,6GAAA,UAAU,OAAA;AAC1B,4DAAyD;AAAjD,4GAAA,YAAY,OAAA;AAEP,QAAA,IAAI,GAAG;IAClB,OAAO,EAAE,YAAY,CAAC,OAAO;IAC7B,KAAK,EAAE,YAAY,CAAC,KAAK;CAC1B,CAAC;AAEW,QAAA,IAAI,GAAG;IAClB,KAAK,EAAE,YAAY,CAAC,KAAK;IACzB,IA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AC,MAAM,EAAE,GAAG,EAAE;QACtB,uEAAuE;QACvE,kBAAkB;QAClB,MAAM,OAAO,GAAG,IAAI,EAAE,CAAC;QACvB,MAAM,MAAM,GAAG,IAAA,4BAAU,EAAC,OAAO,CAAC,CAAC;QACnC,IAAA,kBAAa,EAAC,iBAAiB,OAAO,CAAC,GAAG,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;CACJ"}
|
|
@@ -14,31 +14,20 @@
|
|
|
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.encodeSync = exports.encode = void 0;
|
|
28
19
|
const pify = require("pify");
|
|
29
20
|
const zlib_1 = require("zlib");
|
|
30
21
|
const profile_1 = require("../../proto/profile");
|
|
31
22
|
const gzipPromise = pify(zlib_1.gzip);
|
|
32
|
-
function encode(profile) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return gzipPromise(buffer);
|
|
36
|
-
});
|
|
23
|
+
async function encode(profile) {
|
|
24
|
+
const buffer = profile_1.perftools.profiles.Profile.encode(profile).finish();
|
|
25
|
+
return gzipPromise(buffer);
|
|
37
26
|
}
|
|
38
27
|
exports.encode = encode;
|
|
39
28
|
function encodeSync(profile) {
|
|
40
29
|
const buffer = profile_1.perftools.profiles.Profile.encode(profile).finish();
|
|
41
|
-
return zlib_1.gzipSync(buffer);
|
|
30
|
+
return (0, zlib_1.gzipSync)(buffer);
|
|
42
31
|
}
|
|
43
32
|
exports.encodeSync = encodeSync;
|
|
44
33
|
//# sourceMappingURL=profile-encoder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-encoder.js","sourceRoot":"","sources":["../../ts/src/profile-encoder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"profile-encoder.js","sourceRoot":"","sources":["../../ts/src/profile-encoder.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,6BAA6B;AAC7B,+BAAoC;AAEpC,iDAA8C;AAE9C,MAAM,WAAW,GAAG,IAAI,CAAC,WAAI,CAAC,CAAC;AAExB,KAAK,UAAU,MAAM,CAC1B,OAAoC;IAEpC,MAAM,MAAM,GAAG,mBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IACnE,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC;AALD,wBAKC;AAED,SAAgB,UAAU,CAAC,OAAoC;IAC7D,MAAM,MAAM,GAAG,mBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;IACnE,OAAO,IAAA,eAAQ,EAAC,MAAM,CAAC,CAAC;AAC1B,CAAC;AAHD,gCAGC"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { perftools } from '../../proto/profile';
|
|
17
17
|
import { SourceMapper } from './sourcemapper/sourcemapper';
|
|
18
|
-
import { AllocationProfileNode, TimeProfile } from './v8-types';
|
|
18
|
+
import { AllocationProfileNode, CpuProfile, TimeProfile } from './v8-types';
|
|
19
19
|
/**
|
|
20
20
|
* Converts v8 time profile into into a profile proto.
|
|
21
21
|
* (https://github.com/google/pprof/blob/master/proto/profile.proto)
|
|
@@ -24,6 +24,14 @@ import { AllocationProfileNode, TimeProfile } from './v8-types';
|
|
|
24
24
|
* @param intervalMicros - average time (microseconds) between samples.
|
|
25
25
|
*/
|
|
26
26
|
export declare function serializeTimeProfile(prof: TimeProfile, intervalMicros: number, sourceMapper?: SourceMapper): perftools.profiles.IProfile;
|
|
27
|
+
/**
|
|
28
|
+
* Converts cpu profile into into a profile proto.
|
|
29
|
+
* (https://github.com/google/pprof/blob/master/proto/profile.proto)
|
|
30
|
+
*
|
|
31
|
+
* @param prof - profile to be converted.
|
|
32
|
+
* @param intervalMicros - average time (microseconds) between samples.
|
|
33
|
+
*/
|
|
34
|
+
export declare function serializeCpuProfile(prof: CpuProfile, intervalMicros: number, sourceMapper?: SourceMapper): perftools.profiles.IProfile;
|
|
27
35
|
/**
|
|
28
36
|
* Converts v8 heap profile into into a profile proto.
|
|
29
37
|
* (https://github.com/google/pprof/blob/master/proto/profile.proto)
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.serializeHeapProfile = exports.serializeTimeProfile = void 0;
|
|
18
|
+
exports.serializeHeapProfile = exports.serializeCpuProfile = exports.serializeTimeProfile = void 0;
|
|
19
19
|
const profile_1 = require("../../proto/profile");
|
|
20
20
|
function isGeneratedLocation(location) {
|
|
21
21
|
return (location.column !== undefined &&
|
|
@@ -159,6 +159,16 @@ function createTimeValueType(table) {
|
|
|
159
159
|
unit: table.getIndexOrAdd('nanoseconds'),
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* @return value type for cpu samples (type:cpu, units:nanoseconds), and
|
|
164
|
+
* adds strings used in this value type to the table.
|
|
165
|
+
*/
|
|
166
|
+
function createCpuValueType(table) {
|
|
167
|
+
return new profile_1.perftools.profiles.ValueType({
|
|
168
|
+
type: table.getIndexOrAdd('cpu'),
|
|
169
|
+
unit: table.getIndexOrAdd('nanoseconds'),
|
|
170
|
+
});
|
|
171
|
+
}
|
|
162
172
|
/**
|
|
163
173
|
* @return value type for object counts (type:objects, units:count), and
|
|
164
174
|
* adds strings used in this value type to the table.
|
|
@@ -211,6 +221,68 @@ function serializeTimeProfile(prof, intervalMicros, sourceMapper) {
|
|
|
211
221
|
return profile;
|
|
212
222
|
}
|
|
213
223
|
exports.serializeTimeProfile = serializeTimeProfile;
|
|
224
|
+
function buildLabels(labelSet, stringTable) {
|
|
225
|
+
const labels = [];
|
|
226
|
+
for (const [key, value] of Object.entries(labelSet)) {
|
|
227
|
+
if (typeof value === 'number' || typeof value === 'string') {
|
|
228
|
+
const label = new profile_1.perftools.profiles.Label({
|
|
229
|
+
key: stringTable.getIndexOrAdd(key),
|
|
230
|
+
num: typeof value === 'number' ? value : undefined,
|
|
231
|
+
str: typeof value === 'string'
|
|
232
|
+
? stringTable.getIndexOrAdd(value)
|
|
233
|
+
: undefined,
|
|
234
|
+
});
|
|
235
|
+
labels.push(label);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return labels;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Converts cpu profile into into a profile proto.
|
|
242
|
+
* (https://github.com/google/pprof/blob/master/proto/profile.proto)
|
|
243
|
+
*
|
|
244
|
+
* @param prof - profile to be converted.
|
|
245
|
+
* @param intervalMicros - average time (microseconds) between samples.
|
|
246
|
+
*/
|
|
247
|
+
function serializeCpuProfile(prof, intervalMicros, sourceMapper) {
|
|
248
|
+
const intervalNanos = intervalMicros * 1000;
|
|
249
|
+
const appendCpuEntryToSamples = (entry, samples) => {
|
|
250
|
+
for (const labelSet of entry.node.labelSets) {
|
|
251
|
+
const sample = new profile_1.perftools.profiles.Sample({
|
|
252
|
+
locationId: entry.stack,
|
|
253
|
+
value: [1, intervalNanos],
|
|
254
|
+
label: buildLabels(labelSet, stringTable),
|
|
255
|
+
});
|
|
256
|
+
samples.push(sample);
|
|
257
|
+
}
|
|
258
|
+
const unknownEntryCount = entry.node.hitCount - entry.node.labelSets.length;
|
|
259
|
+
if (unknownEntryCount > 0) {
|
|
260
|
+
const sample = new profile_1.perftools.profiles.Sample({
|
|
261
|
+
locationId: entry.stack,
|
|
262
|
+
value: [
|
|
263
|
+
unknownEntryCount,
|
|
264
|
+
entry.node.cpuTime,
|
|
265
|
+
// unknownEntryCount * intervalNanos,
|
|
266
|
+
],
|
|
267
|
+
});
|
|
268
|
+
samples.push(sample);
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
const stringTable = new StringTable();
|
|
272
|
+
const sampleValueType = createSampleCountValueType(stringTable);
|
|
273
|
+
// const wallValueType = createTimeValueType(stringTable);
|
|
274
|
+
const cpuValueType = createCpuValueType(stringTable);
|
|
275
|
+
const profile = {
|
|
276
|
+
sampleType: [sampleValueType, cpuValueType /*, wallValueType*/],
|
|
277
|
+
timeNanos: Date.now() * 1000 * 1000,
|
|
278
|
+
durationNanos: prof.endTime - prof.startTime,
|
|
279
|
+
periodType: cpuValueType,
|
|
280
|
+
period: intervalMicros,
|
|
281
|
+
};
|
|
282
|
+
serialize(profile, prof.topDownRoot, appendCpuEntryToSamples, stringTable, undefined, sourceMapper);
|
|
283
|
+
return profile;
|
|
284
|
+
}
|
|
285
|
+
exports.serializeCpuProfile = serializeCpuProfile;
|
|
214
286
|
/**
|
|
215
287
|
* Converts v8 heap profile into into a profile proto.
|
|
216
288
|
* (https://github.com/google/pprof/blob/master/proto/profile.proto)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-serializer.js","sourceRoot":"","sources":["../../ts/src/profile-serializer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,iDAA8C;
|
|
1
|
+
{"version":3,"file":"profile-serializer.js","sourceRoot":"","sources":["../../ts/src/profile-serializer.ts"],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