mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
4b74dae6b2
In addition implements --heap-prof-name, --heap-prof-dir and --heap-prof-interval. These flags are similar to --cpu-prof flags but they are meant for the V8 sampling heap profiler instead of the CPU profiler. PR-URL: https://github.com/nodejs/node/pull/27596 Fixes: https://github.com/nodejs/node/issues/27421 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
12 lines
253 B
JavaScript
12 lines
253 B
JavaScript
'use strict';
|
|
|
|
const { Worker } = require('worker_threads');
|
|
const path = require('path');
|
|
new Worker(path.join(__dirname, 'allocation.js'), {
|
|
execArgv: [
|
|
'--heap-prof',
|
|
'--heap-prof-interval',
|
|
process.HEAP_PROF_INTERVAL || '128',
|
|
]
|
|
});
|