Skip to content

Heap used reports "Resident Set Size" instead of "Used Heap" size when profiling Node.js #62

@timneutkens

Description

@timneutkens

Hey 👋 We've recently been using this vscode extension to capture and investigate performance profiles while working on Next.js, this is mostly focused on CPU profiling. Today I was having a look at some memory leak reports and realized memory usage was growing uncontrollably up to 1GB in the debugger chart while the Chrome devtools debugger kept saying only 54MB was allocated.

When looking at process.memoryUsage() I realized that the extension reports the process.memoryUsage().rss instead of process.memoryUsage().heapUsed which Chrome reports. Below the chart it is labeled as "Heap used" though.

My main question is if this is a mistake or intentional? Happy to send a PR to update the label or measurement.

(just for my own future reference) In looking at the issue I found this article that goes in-depth on the differences between the metrics reported https://www.dynatrace.com/news/blog/understanding-garbage-collection-and-hunting-memory-leaks-in-node-js/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions