mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: add process.takeHeapSnapshot() / webContents.takeHeapSnapshot() (#14456)
This commit is contained in:
committed by
Shelley Vohr
parent
1855144d26
commit
e22142ef9c
@@ -171,6 +171,14 @@ Returns `Object`:
|
||||
Returns an object giving memory usage statistics about the entire system. Note
|
||||
that all statistics are reported in Kilobytes.
|
||||
|
||||
### `process.takeHeapSnapshot(filePath)`
|
||||
|
||||
* `filePath` String - Path to the output file.
|
||||
|
||||
Returns `Boolean` - Indicates whether the snapshot has been created successfully.
|
||||
|
||||
Takes a V8 heap snapshot and saves it to `filePath`.
|
||||
|
||||
### `process.hang()`
|
||||
|
||||
Causes the main thread of the current process hang.
|
||||
|
||||
@@ -1497,6 +1497,14 @@ Returns `Integer` - The Chromium internal `pid` of the associated renderer. Can
|
||||
be compared to the `frameProcessId` passed by frame specific navigation events
|
||||
(e.g. `did-frame-navigate`)
|
||||
|
||||
#### `contents.takeHeapSnapshot(filePath)`
|
||||
|
||||
* `filePath` String - Path to the output file.
|
||||
|
||||
Returns `Promise` - Indicates whether the snapshot has been created successfully.
|
||||
|
||||
Takes a V8 heap snapshot and saves it to `filePath`.
|
||||
|
||||
### Instance Properties
|
||||
|
||||
#### `contents.id`
|
||||
|
||||
Reference in New Issue
Block a user