We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e5e2f1 commit 18d913bCopy full SHA for 18d913b
lib/internal/process/pre_execution.js
@@ -365,6 +365,7 @@ function initializeReportSignalHandlers() {
365
366
function initializeHeapSnapshotSignalHandlers() {
367
const signal = getOptionValue('--heapsnapshot-signal');
368
+ const diagnosticDir = getOptionValue('--diagnostic-dir');
369
370
if (!signal)
371
return;
@@ -373,7 +374,7 @@ function initializeHeapSnapshotSignalHandlers() {
373
374
const { writeHeapSnapshot } = require('v8');
375
376
function doWriteHeapSnapshot() {
- writeHeapSnapshot();
377
+ writeHeapSnapshot(diagnosticDir ? diagnosticDir + 'heapsnapshot' : null);
378
}
379
process.on(signal, doWriteHeapSnapshot);
380
0 commit comments