get the max heap size of a node.js application

前端 未结 2 1617
再見小時候
再見小時候 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 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

提交回复
热议问题