mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
v8: integrate node-heapdump into core
Adds `v8.writeHeapSnapshot(filename)` with impl adapted from the `node-heapdump` module. Also, adds a v8.getHeapSnapshot() alternative that returns a Readable Stream PR-URL: https://github.com/nodejs/node/pull/26501 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
parent
024842f8f4
commit
5f38797ea5
14 changed files with 538 additions and 16 deletions
|
@ -5,6 +5,7 @@ const common = require('../common');
|
|||
const { internalBinding } = require('internal/test/binding');
|
||||
const assert = require('assert');
|
||||
const fs = require('fs');
|
||||
const v8 = require('v8');
|
||||
const fsPromises = fs.promises;
|
||||
const net = require('net');
|
||||
const providers = Object.assign({}, internalBinding('async_wrap').Providers);
|
||||
|
@ -294,3 +295,8 @@ if (process.features.inspector && common.isMainThread) {
|
|||
testInitialized(handle, 'Connection');
|
||||
handle.disconnect();
|
||||
}
|
||||
|
||||
// PROVIDER_HEAPDUMP
|
||||
{
|
||||
v8.getHeapSnapshot().destroy();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue