MCPcopy Index your code
hub / github.com/nodejs/node / measureMemory

Function measureMemory

lib/vm.js:383–395  ·  view source on GitHub ↗
(options = kEmptyObject)

Source from the content-addressed store, hash-verified

381};
382
383function 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
397const vmConstants = {
398 __proto__: null,

Callers

nothing calls this directly

Calls 1

emitExperimentalWarningFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…