简体   繁体   English

如何测量当前node.js进程的峰值内存使用情况

[英]How to measure peak memory usage for current node.js process

Is there a way to find the peak memory usage for current node.js process? 有没有办法找到当前node.js进程的峰值内存使用情况? Best would be platform independent, but else something in Linux only? 最好是独立于平台,但在Linux中只有一些东西? No extra tools allowed like for example valgrind or whatever. 没有额外的工具允许,例如valgrind或其他任何东西。

You could take snapshots using the process.memoryUsage() method, and cache them. 您可以使用process.memoryUsage()方法拍摄快照,并缓存它们。

Node.js Docs for process module Node.js process模块的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM