(options = kEmptyObject)
| 381 | }; |
| 382 | |
| 383 | function measureMemory(options = kEmptyObject) { |
| 384 | emitExperimentalWarning('vm.measureMemory'); |
| 385 | validateObject(options, 'options'); |
| 386 | const { mode = 'summary', execution = 'default' } = options; |
| 387 | validateOneOf(mode, 'options.mode', ['summary', 'detailed']); |
| 388 | validateOneOf(execution, 'options.execution', ['default', 'eager']); |
| 389 | const result = _measureMemory(measureMemoryModes[mode], |
| 390 | measureMemoryExecutions[execution]); |
| 391 | if (result === undefined) { |
| 392 | return PromiseReject(new ERR_CONTEXT_NOT_INITIALIZED()); |
| 393 | } |
| 394 | return result; |
| 395 | } |
| 396 | |
| 397 | const vmConstants = { |
| 398 | __proto__: null, |
nothing calls this directly
no test coverage detected
searching dependent graphs…