Socket
Socket
Sign inDemoInstall

@datadog/pprof

Package Overview
Dependencies
6
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0 to 6.0.0-pre-391b56d

4

out/src/heap-profiler.js

@@ -21,3 +21,3 @@ "use strict";

const profile_serializer_1 = require("./profile-serializer");
const node_worker_threads_1 = require("node:worker_threads");
const worker_threads_1 = require("worker_threads");
let enabled = false;

@@ -137,5 +137,5 @@ let heapIntervalBytes = 0;

}
(0, heap_profiler_bindings_1.monitorOutOfMemory)(heapLimitExtensionSize, maxHeapLimitExtensionCount, dumpHeapProfileOnSdterr, exportCommand || [], newCallback, typeof callbackMode !== 'undefined' ? callbackMode : exports.CallbackMode.Async, node_worker_threads_1.isMainThread);
(0, heap_profiler_bindings_1.monitorOutOfMemory)(heapLimitExtensionSize, maxHeapLimitExtensionCount, dumpHeapProfileOnSdterr, exportCommand || [], newCallback, typeof callbackMode !== 'undefined' ? callbackMode : exports.CallbackMode.Async, worker_threads_1.isMainThread);
}
exports.monitorOutOfMemory = monitorOutOfMemory;
//# sourceMappingURL=heap-profiler.js.map

@@ -218,3 +218,6 @@ "use strict";

if (Object.keys(labels).length > 0) {
const values = [1, intervalNanos];
// Only assign wall time if there are hits, some special nodes such as `(Non-JS threads)`
// have zero hit count (since they do not count as wall time) and should not be assigned any
// wall time.
const values = unlabelledHits > 0 ? [1, intervalNanos] : [0, 0];
if (prof.hasCpuTime) {

@@ -237,3 +240,5 @@ values.push(context.cpuTime);

const labels = generateLabels ? generateLabels({ node: entry.node }) : {};
const values = [unlabelledHits, unlabelledHits * intervalNanos];
const values = unlabelledHits > 0
? [unlabelledHits, unlabelledHits * intervalNanos]
: [0, 0];
if (prof.hasCpuTime) {

@@ -265,3 +270,3 @@ values.push(unlabelledCpuTime);

};
if (prof.nonJSThreadsCpuTime) {
if (prof.hasCpuTime && prof.nonJSThreadsCpuTime) {
const node = {

@@ -268,0 +273,0 @@ name: exports.NON_JS_THREADS_FUNCTION_NAME,

@@ -26,3 +26,3 @@ "use strict";

Object.defineProperty(exports, "getNativeThreadId", { enumerable: true, get: function () { return time_profiler_bindings_1.getNativeThreadId; } });
const node_worker_threads_1 = require("node:worker_threads");
const worker_threads_1 = require("worker_threads");
const { kSampleCount } = time_profiler_bindings_1.constants;

@@ -62,3 +62,3 @@ const DEFAULT_INTERVAL_MICROS = 1000;

}
gProfiler = new time_profiler_bindings_1.TimeProfiler({ ...options, isMainThread: node_worker_threads_1.isMainThread });
gProfiler = new time_profiler_bindings_1.TimeProfiler({ ...options, isMainThread: worker_threads_1.isMainThread });
gSourceMapper = options.sourceMapper;

@@ -95,2 +95,3 @@ gIntervalMicros = options.intervalMicros;

if (!restart) {
gProfiler.dispose();
gProfiler = undefined;

@@ -97,0 +98,0 @@ gSourceMapper = undefined;

{
"name": "@datadog/pprof",
"version": "5.0.0",
"version": "6.0.0-pre-391b56d",
"description": "pprof support for Node.js",

@@ -9,15 +9,23 @@ "repository": "datadog/pprof-nodejs",

"scripts": {
"install": "exit 0",
"rebuild": "node-gyp rebuild --jobs=max",
"test:js": "nyc mocha -r source-map-support/register out/test/test-*.js",
"test:cpp": "node scripts/cctest.js",
"test:wall": "nyc mocha -r source-map-support/register out/test/test-time-profiler.js",
"test": "npm run test:js && npm run test:cpp",
"build:asan": "node-gyp configure build --jobs=max --address_sanitizer",
"build:tsan": "node-gyp configure build --jobs=max --thread_sanitizer",
"build": "node-gyp configure build --jobs=max",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json",
"compile": "tsc -p .",
"fix": "gts fix",
"format": "clang-format --style file -i --glob='bindings/**/*.{h,hh,cpp,cc}'",
"install": "exit 0",
"lint": "jsgl --local . && gts check && clang-format --style file -n -Werror --glob='bindings/**/*.{h,hh,cpp,cc}'",
"format": "clang-format --style file -i --glob='bindings/**/*.{h,hh,cpp,cc}'",
"prepare": "npm run compile && npm run rebuild",
"pretest": "npm run compile"
"pretest:js-asan": "npm run compile && npm run build:asan",
"pretest:js-tsan": "npm run compile && npm run build:tsan",
"pretest:js-valgrind": "npm run pretest",
"pretest": "npm run compile",
"rebuild": "node-gyp rebuild --jobs=max",
"test:cpp": "node scripts/cctest.js",
"test:js-asan": "LSAN_OPTIONS='suppressions=./suppressions/lsan_suppr.txt' LD_PRELOAD=`gcc -print-file-name=libasan.so` mocha out/test/test-*.js",
"test:js-tsan": "LD_PRELOAD=`gcc -print-file-name=libtsan.so` mocha out/test/test-*.js",
"test:js-valgrind": "valgrind --leak-check=full mocha out/test/test-*.js",
"test:js": "nyc mocha -r source-map-support/register out/test/test-*.js",
"test": "npm run test:js && npm run test:cpp"
},

@@ -24,0 +32,0 @@ "author": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc