(options)
| 539 | } |
| 540 | |
| 541 | getHeapSnapshot(options) { |
| 542 | const { |
| 543 | HeapSnapshotStream, |
| 544 | getHeapSnapshotOptions, |
| 545 | } = require('internal/heap_utils'); |
| 546 | const optionsArray = getHeapSnapshotOptions(options); |
| 547 | const heapSnapshotTaker = this[kHandle]?.takeHeapSnapshot(optionsArray); |
| 548 | return new Promise((resolve, reject) => { |
| 549 | if (!heapSnapshotTaker) return reject(new ERR_WORKER_NOT_RUNNING()); |
| 550 | heapSnapshotTaker.ondone = (handle) => { |
| 551 | resolve(new HeapSnapshotStream(handle)); |
| 552 | }; |
| 553 | }); |
| 554 | } |
| 555 | |
| 556 | getHeapStatistics() { |
| 557 | const taker = this[kHandle]?.getHeapStatistics(); |
no test coverage detected