get the max heap size of a node.js application

前端 未结 2 1601
再見小時候
再見小時候 2021-02-20 05:21

Now I am using node.js in paas platform. And the container has memory limit. Now I want to get the maximum of the heap size of node.js application. I know that use the parameter

相关标签:
2条回答
  • 2021-02-20 05:56

    you can use the process.memoryUsage https://nodejs.org/api/process.html#process_process_memoryusage

    0 讨论(0)
  • 2021-02-20 06:18

    You can try the v8 module, it is documented here: https://nodejs.org/api/v8.html

    I believe getHeapStatistics() function will give you everything you need

    0 讨论(0)
提交回复
热议问题