@datadog/pprof 3.0.0 → 3.1.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.
Files changed (85) hide show
  1. package/out/src/index.d.ts +6 -2
  2. package/out/src/index.js +3 -1
  3. package/out/src/index.js.map +1 -1
  4. package/out/src/profile-serializer.d.ts +2 -10
  5. package/out/src/profile-serializer.js +6 -56
  6. package/out/src/profile-serializer.js.map +1 -1
  7. package/out/src/time-profiler-bindings.d.ts +1 -0
  8. package/out/src/time-profiler-bindings.js +2 -1
  9. package/out/src/time-profiler-bindings.js.map +1 -1
  10. package/out/src/time-profiler.d.ts +10 -6
  11. package/out/src/time-profiler.js +20 -11
  12. package/out/src/time-profiler.js.map +1 -1
  13. package/out/src/v8-types.d.ts +1 -40
  14. package/package.json +1 -1
  15. package/prebuilds/darwin-arm64/node-102.node +0 -0
  16. package/prebuilds/darwin-arm64/node-108.node +0 -0
  17. package/prebuilds/darwin-arm64/node-111.node +0 -0
  18. package/prebuilds/darwin-arm64/node-115.node +0 -0
  19. package/prebuilds/darwin-arm64/node-72.node +0 -0
  20. package/prebuilds/darwin-arm64/node-79.node +0 -0
  21. package/prebuilds/darwin-arm64/node-83.node +0 -0
  22. package/prebuilds/darwin-arm64/node-88.node +0 -0
  23. package/prebuilds/darwin-arm64/node-93.node +0 -0
  24. package/prebuilds/darwin-x64/node-102.node +0 -0
  25. package/prebuilds/darwin-x64/node-108.node +0 -0
  26. package/prebuilds/darwin-x64/node-111.node +0 -0
  27. package/prebuilds/darwin-x64/node-115.node +0 -0
  28. package/prebuilds/darwin-x64/node-72.node +0 -0
  29. package/prebuilds/darwin-x64/node-79.node +0 -0
  30. package/prebuilds/darwin-x64/node-83.node +0 -0
  31. package/prebuilds/darwin-x64/node-88.node +0 -0
  32. package/prebuilds/darwin-x64/node-93.node +0 -0
  33. package/prebuilds/linux-arm/node-102.node +0 -0
  34. package/prebuilds/linux-arm/node-108.node +0 -0
  35. package/prebuilds/linux-arm/node-111.node +0 -0
  36. package/prebuilds/linux-arm/node-115.node +0 -0
  37. package/prebuilds/linux-arm/node-72.node +0 -0
  38. package/prebuilds/linux-arm/node-79.node +0 -0
  39. package/prebuilds/linux-arm/node-83.node +0 -0
  40. package/prebuilds/linux-arm/node-88.node +0 -0
  41. package/prebuilds/linux-arm/node-93.node +0 -0
  42. package/prebuilds/linux-arm64/node-102.node +0 -0
  43. package/prebuilds/linux-arm64/node-108.node +0 -0
  44. package/prebuilds/linux-arm64/node-111.node +0 -0
  45. package/prebuilds/linux-arm64/node-115.node +0 -0
  46. package/prebuilds/linux-arm64/node-72.node +0 -0
  47. package/prebuilds/linux-arm64/node-79.node +0 -0
  48. package/prebuilds/linux-arm64/node-83.node +0 -0
  49. package/prebuilds/linux-arm64/node-88.node +0 -0
  50. package/prebuilds/linux-arm64/node-93.node +0 -0
  51. package/prebuilds/linux-ia32/node-72.node +0 -0
  52. package/prebuilds/linux-ia32/node-79.node +0 -0
  53. package/prebuilds/linux-x64/node-102.node +0 -0
  54. package/prebuilds/linux-x64/node-108.node +0 -0
  55. package/prebuilds/linux-x64/node-111.node +0 -0
  56. package/prebuilds/linux-x64/node-115.node +0 -0
  57. package/prebuilds/linux-x64/node-72.node +0 -0
  58. package/prebuilds/linux-x64/node-79.node +0 -0
  59. package/prebuilds/linux-x64/node-83.node +0 -0
  60. package/prebuilds/linux-x64/node-88.node +0 -0
  61. package/prebuilds/linux-x64/node-93.node +0 -0
  62. package/prebuilds/linuxmusl-x64/node-102.node +0 -0
  63. package/prebuilds/linuxmusl-x64/node-108.node +0 -0
  64. package/prebuilds/linuxmusl-x64/node-111.node +0 -0
  65. package/prebuilds/linuxmusl-x64/node-115.node +0 -0
  66. package/prebuilds/linuxmusl-x64/node-72.node +0 -0
  67. package/prebuilds/linuxmusl-x64/node-79.node +0 -0
  68. package/prebuilds/linuxmusl-x64/node-83.node +0 -0
  69. package/prebuilds/linuxmusl-x64/node-88.node +0 -0
  70. package/prebuilds/linuxmusl-x64/node-93.node +0 -0
  71. package/prebuilds/win32-ia32/node-102.node +0 -0
  72. package/prebuilds/win32-ia32/node-72.node +0 -0
  73. package/prebuilds/win32-ia32/node-79.node +0 -0
  74. package/prebuilds/win32-ia32/node-83.node +0 -0
  75. package/prebuilds/win32-ia32/node-88.node +0 -0
  76. package/prebuilds/win32-ia32/node-93.node +0 -0
  77. package/prebuilds/win32-x64/node-102.node +0 -0
  78. package/prebuilds/win32-x64/node-108.node +0 -0
  79. package/prebuilds/win32-x64/node-111.node +0 -0
  80. package/prebuilds/win32-x64/node-115.node +0 -0
  81. package/prebuilds/win32-x64/node-72.node +0 -0
  82. package/prebuilds/win32-x64/node-79.node +0 -0
  83. package/prebuilds/win32-x64/node-83.node +0 -0
  84. package/prebuilds/win32-x64/node-88.node +0 -0
  85. package/prebuilds/win32-x64/node-93.node +0 -0
@@ -1,6 +1,6 @@
1
1
  import * as heapProfiler from './heap-profiler';
2
2
  import * as timeProfiler from './time-profiler';
3
- export { AllocationProfileNode, TimeProfileNode, ProfileNode } from './v8-types';
3
+ export { AllocationProfileNode, TimeProfileNode, ProfileNode, LabelSet, } from './v8-types';
4
4
  export { encode, encodeSync } from './profile-encoder';
5
5
  export { SourceMapper } from './sourcemapper/sourcemapper';
6
6
  export { setLogger } from './logger';
@@ -8,8 +8,12 @@ export declare const time: {
8
8
  profile: typeof timeProfiler.profile;
9
9
  start: typeof timeProfiler.start;
10
10
  stop: typeof timeProfiler.stop;
11
- setLabels: typeof timeProfiler.setLabels;
11
+ setContext: typeof timeProfiler.setContext;
12
12
  isStarted: typeof timeProfiler.isStarted;
13
+ getState: typeof timeProfiler.getState;
14
+ constants: {
15
+ kSampleCount: any;
16
+ };
13
17
  };
14
18
  export declare const heap: {
15
19
  start: typeof heapProfiler.start;
package/out/src/index.js CHANGED
@@ -54,8 +54,10 @@ exports.time = {
54
54
  profile: timeProfiler.profile,
55
55
  start: timeProfiler.start,
56
56
  stop: timeProfiler.stop,
57
- setLabels: timeProfiler.setLabels,
57
+ setContext: timeProfiler.setContext,
58
58
  isStarted: timeProfiler.isStarted,
59
+ getState: timeProfiler.getState,
60
+ constants: timeProfiler.constants,
59
61
  };
60
62
  exports.heap = {
61
63
  start: heapProfiler.start,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;GAcG;AACH,2BAAiC;AAEjC,8DAAgD;AAChD,uDAA6C;AAC7C,8DAAgD;AAGhD,qDAAqD;AAA7C,yGAAA,MAAM,OAAA;AAAE,6GAAA,UAAU,OAAA;AAC1B,4DAAyD;AAAjD,4GAAA,YAAY,OAAA;AACpB,mCAAmC;AAA3B,mGAAA,SAAS,OAAA;AAEJ,QAAA,IAAI,GAAG;IAClB,OAAO,EAAE,YAAY,CAAC,OAAO;IAC7B,KAAK,EAAE,YAAY,CAAC,KAAK;IACzB,IAAI,EAAE,YAAY,CAAC,IAAI;IACvB,SAAS,EAAE,YAAY,CAAC,SAAS;IACjC,SAAS,EAAE,YAAY,CAAC,SAAS;CAClC,CAAC;AAEW,QAAA,IAAI,GAAG;IAClB,KAAK,EAAE,YAAY,CAAC,KAAK;IACzB,IAAI,EAAE,YAAY,CAAC,IAAI;IACvB,OAAO,EAAE,YAAY,CAAC,OAAO;IAC7B,cAAc,EAAE,YAAY,CAAC,cAAc;IAC3C,SAAS,EAAE,YAAY,CAAC,SAAS;IACjC,kBAAkB,EAAE,YAAY,CAAC,kBAAkB;IACnD,YAAY,EAAE,YAAY,CAAC,YAAY;CACxC,CAAC;AAEF,6CAA6C;AAC7C,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,kBAAkB,EAAE;IAC5D,YAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACtB,uEA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M,CAAC,MAAM,CAAC,EAAE,KAAK,kBAAkB,EAAE;IAC5D,YAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACtB,uEAAuE;QACvE,kBAAkB;QAClB,MAAM,OAAO,GAAG,YAAI,CAAC,IAAI,EAAE,CAAC;QAC5B,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"}
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { Profile } from 'pprof-format';
17
17
  import { SourceMapper } from './sourcemapper/sourcemapper';
18
- import { AllocationProfileNode, CpuProfile, TimeProfile } from './v8-types';
18
+ import { AllocationProfileNode, LabelSet, 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)
@@ -23,15 +23,7 @@ import { AllocationProfileNode, CpuProfile, TimeProfile } from './v8-types';
23
23
  * @param prof - profile to be converted.
24
24
  * @param intervalMicros - average time (microseconds) between samples.
25
25
  */
26
- export declare function serializeTimeProfile(prof: TimeProfile, intervalMicros: number, sourceMapper?: SourceMapper, recomputeSamplingInterval?: boolean): Profile;
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): Profile;
26
+ export declare function serializeTimeProfile(prof: TimeProfile, intervalMicros: number, sourceMapper?: SourceMapper, recomputeSamplingInterval?: boolean, generateLabels?: (context: object) => LabelSet): Profile;
35
27
  /**
36
28
  * Converts v8 heap profile into into a profile proto.
37
29
  * (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.serializeCpuProfile = exports.serializeTimeProfile = void 0;
18
+ exports.serializeHeapProfile = exports.serializeTimeProfile = void 0;
19
19
  const pprof_format_1 = require("pprof-format");
20
20
  function isGeneratedLocation(location) {
21
21
  return (location.column !== undefined &&
@@ -135,16 +135,6 @@ function createTimeValueType(table) {
135
135
  unit: table.dedup('nanoseconds'),
136
136
  });
137
137
  }
138
- /**
139
- * @return value type for cpu samples (type:cpu, units:nanoseconds), and
140
- * adds strings used in this value type to the table.
141
- */
142
- function createCpuValueType(table) {
143
- return new pprof_format_1.ValueType({
144
- type: table.dedup('cpu'),
145
- unit: table.dedup('nanoseconds'),
146
- });
147
- }
148
138
  /**
149
139
  * @return value type for object counts (type:objects, units:count), and
150
140
  * adds strings used in this value type to the table.
@@ -176,7 +166,7 @@ function computeTotalHitCount(root) {
176
166
  * @param prof - profile to be converted.
177
167
  * @param intervalMicros - average time (microseconds) between samples.
178
168
  */
179
- function serializeTimeProfile(prof, intervalMicros, sourceMapper, recomputeSamplingInterval = false) {
169
+ function serializeTimeProfile(prof, intervalMicros, sourceMapper, recomputeSamplingInterval = false, generateLabels) {
180
170
  // If requested, recompute sampling interval from profile duration and total number of hits,
181
171
  // since profile duration should be #hits x interval.
182
172
  // Recomputing an average interval is more accurate, since in practice intervals between
@@ -193,12 +183,13 @@ function serializeTimeProfile(prof, intervalMicros, sourceMapper, recomputeSampl
193
183
  const intervalNanos = intervalMicros * 1000;
194
184
  const appendTimeEntryToSamples = (entry, samples) => {
195
185
  let unlabelledHits = entry.node.hitCount;
196
- for (const labelSet of entry.node.labelSets || []) {
197
- if (Object.keys(labelSet).length > 0) {
186
+ for (const context of entry.node.contexts || []) {
187
+ const labels = generateLabels ? generateLabels(context) : context;
188
+ if (Object.keys(labels).length > 0) {
198
189
  const sample = new pprof_format_1.Sample({
199
190
  locationId: entry.stack,
200
191
  value: [1, intervalNanos],
201
- label: buildLabels(labelSet, stringTable),
192
+ label: buildLabels(labels, stringTable),
202
193
  });
203
194
  samples.push(sample);
204
195
  unlabelledHits--;
@@ -242,47 +233,6 @@ function buildLabels(labelSet, stringTable) {
242
233
  }
243
234
  return labels;
244
235
  }
245
- /**
246
- * Converts cpu profile into into a profile proto.
247
- * (https://github.com/google/pprof/blob/master/proto/profile.proto)
248
- *
249
- * @param prof - profile to be converted.
250
- * @param intervalMicros - average time (microseconds) between samples.
251
- */
252
- function serializeCpuProfile(prof, intervalMicros, sourceMapper) {
253
- const intervalNanos = intervalMicros * 1000;
254
- const appendCpuEntryToSamples = (entry, samples) => {
255
- for (const labelCpu of entry.node.labelSets) {
256
- const sample = new pprof_format_1.Sample({
257
- locationId: entry.stack,
258
- value: [1, labelCpu.cpuTime],
259
- label: buildLabels(labelCpu.labels, stringTable),
260
- });
261
- samples.push(sample);
262
- }
263
- if (entry.node.hitCount > 0) {
264
- const sample = new pprof_format_1.Sample({
265
- locationId: entry.stack,
266
- value: [entry.node.hitCount, entry.node.cpuTime],
267
- });
268
- samples.push(sample);
269
- }
270
- };
271
- const stringTable = new pprof_format_1.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: intervalNanos,
281
- };
282
- serialize(profile, prof.topDownRoot, appendCpuEntryToSamples, stringTable, undefined, sourceMapper);
283
- return new pprof_format_1.Profile(profile);
284
- }
285
- exports.serializeCpuProfile = serializeCpuProfile;
286
236
  /**
287
237
  * Converts v8 heap profile into into a profile proto.
288
238
  * (https://github.com/google/pprof/blob/master/proto/prof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constants: any;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TimeProfiler = void 0;
3
+ exports.constants = exports.TimeProfiler = void 0;
4
4
  /**
5
5
  * Copyright 2018 Google Inc. All Rights Reserved.
6
6
  *
@@ -20,4 +20,5 @@ const path_1 = require("path");
20
20
  const findBinding = require('node-gyp-build');
21
21
  const profiler = findBinding((0, path_1.join)(__dirname, '..', '..'));
22
22
  exports.TimeProfiler = profiler.TimeProfiler;
23
+ exports.constants = profiler.constants;
23
24
  //# 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,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAE7C,QAAA,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC"}
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;AACrC,QAAA,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC"}
@@ -30,11 +30,15 @@ export interface TimeProfilerOptions {
30
30
  * This defaults to false.
31
31
  */
32
32
  lineNumbers?: boolean;
33
- customLabels?: boolean;
33
+ withContexts?: boolean;
34
34
  }
35
- export declare function profile({ intervalMicros, durationMillis, sourceMapper, lineNumbers, customLabels, }: TimeProfilerOptions): Promise<import("pprof-format").Profile>;
36
- export declare function start({ intervalMicros, durationMillis, sourceMapper, lineNumbers, customLabels, }: TimeProfilerOptions): void;
37
- export declare function stop(restart?: boolean): import("pprof-format").Profile;
38
- export declare function setLabels(labels?: LabelSet): void;
35
+ export declare function profile({ intervalMicros, durationMillis, sourceMapper, lineNumbers, withContexts, }: TimeProfilerOptions): Promise<import("pprof-format").Profile>;
36
+ export declare function start({ intervalMicros, durationMillis, sourceMapper, lineNumbers, withContexts, }: TimeProfilerOptions): void;
37
+ export declare function stop(restart?: boolean, generateLabels?: (context: object) => LabelSet): import("pprof-format").Profile;
38
+ export declare function getState(): any;
39
+ export declare function setContext(context?: object): void;
39
40
  export declare function isStarted(): boolean;
40
- export {};
41
+ export declare const constants: {
42
+ kSampleCount: any;
43
+ };
44
+ export { LabelSet };
@@ -18,10 +18,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
18
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.isStarted = exports.setLabels = exports.stop = exports.start = exports.profile = void 0;
21
+ exports.constants = exports.isStarted = exports.setContext = exports.getState = exports.stop = exports.start = exports.profile = void 0;
22
22
  const delay_1 = __importDefault(require("delay"));
23
23
  const profile_serializer_1 = require("./profile-serializer");
24
24
  const time_profiler_bindings_1 = require("./time-profiler-bindings");
25
+ const { kSampleCount } = time_profiler_bindings_1.constants;
25
26
  const DEFAULT_INTERVAL_MICROS = 1000;
26
27
  const DEFAULT_DURATION_MILLIS = 60000;
27
28
  let gProfiler;
@@ -33,35 +34,35 @@ process.once('exit', () => {
33
34
  if (isStarted())
34
35
  stop();
35
36
  });
36
- async function profile({ intervalMicros = DEFAULT_INTERVAL_MICROS, durationMillis = DEFAULT_DURATION_MILLIS, sourceMapper, lineNumbers = false, customLabels = false, }) {
37
+ async function profile({ intervalMicros = DEFAULT_INTERVAL_MICROS, durationMillis = DEFAULT_DURATION_MILLIS, sourceMapper, lineNumbers = false, withContexts = false, }) {
37
38
  start({
38
39
  intervalMicros,
39
40
  durationMillis,
40
41
  sourceMapper,
41
42
  lineNumbers,
42
- customLabels,
43
+ withContexts,
43
44
  });
44
45
  await (0, delay_1.default)(durationMillis);
45
46
  return stop();
46
47
  }
47
48
  exports.profile = profile;
48
49
  // Temporarily retained for backwards compatibility with older tracer
49
- function start({ intervalMicros = DEFAULT_INTERVAL_MICROS, durationMillis = DEFAULT_DURATION_MILLIS, sourceMapper, lineNumbers = false, customLabels = false, }) {
50
+ function start({ intervalMicros = DEFAULT_INTERVAL_MICROS, durationMillis = DEFAULT_DURATION_MILLIS, sourceMapper, lineNumbers = false, withContexts = false, }) {
50
51
  if (gProfiler) {
51
52
  throw new Error('Wall profiler is already started');
52
53
  }
53
- gProfiler = new time_profiler_bindings_1.TimeProfiler(intervalMicros, durationMillis * 1000, lineNumbers, customLabels);
54
- gProfiler.start();
54
+ gProfiler = new time_profiler_bindings_1.TimeProfiler(intervalMicros, durationMillis * 1000, lineNumbers, withContexts);
55
55
  gSourceMapper = sourceMapper;
56
56
  gIntervalMicros = intervalMicros;
57
+ gProfiler.start();
57
58
  }
58
59
  exports.start = start;
59
- function stop(restart = false) {
60
+ function stop(restart = false, generateLabels) {
60
61
  if (!gProfiler) {
61
62
  throw new Error('Wall profiler is not started');
62
63
  }
63
64
  const profile = gProfiler.stop(restart);
64
- const serialized_profile = (0, profile_serializer_1.serializeTimeProfile)(profile, gIntervalMicros, gSourceMapper, true);
65
+ const serialized_profile = (0, profile_serializer_1.serializeTimeProfile)(profile, gIntervalMicros, gSourceMapper, true, generateLabels);
65
66
  if (!restart) {
66
67
  gProfiler = undefined;
67
68
  gSourceMapper = undefined;
@@ -69,15 +70,23 @@ function stop(restart = false) {
69
70
  return serialized_profile;
70
71
  }
71
72
  exports.stop = stop;
72
- function setLabels(labels) {
73
+ function getState() {
74
+ if (!gProfiler) {
75
+ throw new Error('Wall profiler is not started');
76
+ }
77
+ return gProfiler.state;
78
+ }
79
+ exports.getState = getState;
80
+ function setContext(context) {
73
81
  if (!gProfiler) {
74
82
  throw new Error('Wall profiler is not started');
75
83
  }
76
- gProfiler.labels = labels;
84
+ gProfiler.context = context;
77
85
  }
78
- exports.setLabels = setLabels;
86
+ exports.setContext = setContext;
79
87
  function isStarted() {
80
88
  return !!gProfiler;
81
89
  }
82
90
  exports.isStarted = isStarted;
91
+ exports.constants = { kSampleCount };
83
92
  //# sourceMappingURL=time-profiler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"time-profiler.js","sourceRoot":"","sources":["../../ts/src/time-profiler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;AAEH,kDAA0B;AAE1B,6DAA0D;AAE1D,qEAAsD;AAGtD,MAAM,uBAAuB,GAAiB,IAAI,CAAC;AACnD,MAAM,uBAAuB,GAAiB,KAAK,CAAC;AAKpD,IAAI,SAAwD,CAAC;AAC7D,IAAI,aAAuC,CAAC;AAC5C,IAAI,eAA6B,CAAC;AAElC;6DAC6D;AAC7D,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;IACxB,IAAI,SAAS,EAAE;QAAE,IAAI,EAAE,CAAC;AAC1B,CAAC,CAAC,CAAC;AAmBI,KAAK,UAAU,OAAO,CAAC,EAC5B,cAAc,GAAG,uBAAuB,EACxC,cAAc,GAAG,uBAAuB,EACxC,YAAY,EACZ,WAAW,GAAG,KAAK,EACnB,YAAY,GAAG,KAAK,GACA;IACpB,KAAK,CAAC;QACJ,cAAc;QACd,cAAc;QACd,YAAY;QACZ,WAAW;QACX,YAAY;KACb,CAAC,CAAC;IACH,MAAM,IAAA,eAAK,EAAC,cAAc,CAAC,CAAC;IAC5B,OAAO,IAAI,EAAE,CAAC;AAChB,CAAC;AAhBD,0BAgBC;AAED,qEAAqE;AACrE,SAAgB,KAAK,CAAC,EACpB,cAAc,GAAG,uBAAuB,EACxC,cAAc,GAAG,uBAAuB,EACxC,YAAY,EACZ,WAAW,GAAG,KAAK,EACnB,YAAY,GAAG,KAAK,GACA;IACpB,IAAI,SAAS,EAAE;QACb,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;KACrD;IAED,SAAS,GAAG,IAAI,qCAAY,CAC1B,cAAc,EACd,cAAc,GAAG,IAAI,EACrB,WAAW,EACX,YAAY,CACb,CAAC;IACF,SAAS,CAAC,KAAK,EAAE,CAAC;IAClB,aAAa,GAAG,YAAY,CAAC;IAC7B,eAAe,GAAG,cAAc,CAAC;AACnC,CAAC;AApBD,sBAoBC;AAED,SAAgB,IAAI,CAAC,OAAO,GAAG,KAAK;IAClC,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACjD;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,kBAAkB,GAAG,IAAA,yCAAoB,EAC7C,OAAO,EACP,eAAe,EACf,aAAa,EACb,IAAI,CACL,CAAC;IACF,IAAI,CAAC,OAAO,EAAE;QACZ,SAAS,GAAG,SAAS,CAAC;QACtB,aAAa,GAAG,SAAS,CAAC;KAC3B;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAjBD,oBAiBC;AAED,SAAgB,SAAS,CAAC,MAAiB;IACzC,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACjD;IACD,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC;AAC5B,CAAC;AALD,8BAKC;AAED,SAAgB,SAAS;IACvB,OAAO,CAAC,CAAC,SAAS,CAAC;AACrB,CAAC;AAFD,8BAEC"}
1
+ {"version":3,"file":"time-profiler.js","sourceRoot":"","sources":["../../ts/src/time-profiler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;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AgB,IAAI,CAClB,OAAO,GAAG,KAAK,EACf,cAA8C;IAE9C,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACjD;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,kBAAkB,GAAG,IAAA,yCAAoB,EAC7C,OAAO,EACP,eAAe,EACf,aAAa,EACb,IAAI,EACJ,cAAc,CACf,CAAC;IACF,IAAI,CAAC,OAAO,EAAE;QACZ,SAAS,GAAG,SAAS,CAAC;QACtB,aAAa,GAAG,SAAS,CAAC;KAC3B;IACD,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AArBD,oBAqBC;AAED,SAAgB,QAAQ;IACtB,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACjD;IACD,OAAO,SAAS,CAAC,KAAK,CAAC;AACzB,CAAC;AALD,4BAKC;AAED,SAAgB,UAAU,CAAC,OAAgB;IACzC,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KACjD;IACD,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;AAC9B,CAAC;AALD,gCAKC;AAED,SAAgB,SAAS;IACvB,OAAO,CAAC,CAAC,SAAS,CAAC;AACrB,CAAC;AAFD,8BAEC;AAEY,QAAA,SAAS,GAAG,EAAC,YAAY,EAAC,CAAC"}
@@ -30,7 +30,7 @@ export interface ProfileNode {
30
30
  }
31
31
  export interface TimeProfileNode extends ProfileNode {
32
32
  hitCount: number;
33
- labelSets?: LabelSet[];
33
+ contexts?: object[];
34
34
  }
35
35
  export interface AllocationProfileNode extends ProfileNode {
36
36
  allocations: Allocation[];
@@ -39,45 +39,6 @@ export interface Allocation {
39
39
  sizeBytes: number;
40
40
  count: number;
41
41
  }
42
- export interface InitialCpuProfile {
43
- /** Time in nanoseconds at which profile was stopped. */
44
- endTime: number;
45
- samples: CpuProfileSample[];
46
- /** Time in nanoseconds at which profile was started. */
47
- startTime: number;
48
- }
49
- export interface CpuProfile {
50
- /** Time in nanoseconds at which profile was stopped. */
51
- endTime: number;
52
- topDownRoot: CpuProfileNode;
53
- /** Time in nanoseconds at which profile was started. */
54
- startTime: number;
55
- }
56
42
  export interface LabelSet {
57
43
  [key: string]: string | number;
58
44
  }
59
- export interface LabelsCpu {
60
- labels: LabelSet;
61
- cpuTime: number;
62
- }
63
- export interface CpuProfileNode extends ProfileNode {
64
- hitCount: number;
65
- cpuTime: number;
66
- labelSets: LabelsCpu[];
67
- }
68
- export interface CpuProfileSample {
69
- labels: LabelSet;
70
- locations: CodeEvent[];
71
- cpuTime: number;
72
- }
73
- export interface CodeEvent {
74
- address: number;
75
- previousAddress?: number;
76
- size: number;
77
- comment?: string;
78
- functionName?: string;
79
- scriptName?: string;
80
- scriptId: number;
81
- line: number;
82
- column: number;
83
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datadog/pprof",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "pprof support for Node.js",
5
5
  "repository": "datadog/pprof-nodejs",
6
6
  "main": "out/src/index.js",
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
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file