Function memoryUsage

  • Returns the memory usage of the Node.js process with values converted from bytes to megabytes and rounded to the specified precision.

    Parameters

    • precision: number = 2

      The number of decimal places to which the memory usage values should be rounded.

    Returns NodeJS.MemoryUsage

    An object containing the memory usage of the Node.js process. The properties of the object are:

    • rss: Resident Set Size - the portion of the process's memory held in RAM.
    • heapTotal: Total size of the allocated heap.
    • heapUsed: Actual memory used during the execution of the process.
    • external: Memory used by C++ objects bound to JavaScript objects managed by V8.
    • arrayBuffers: Memory used by ArrayBuffers and SharedArrayBuffers, including all Node.js Buffers.

Generated using TypeDoc