简体   繁体   中英

Starting node with v8 profiler enabled from ng start

When starting my application in development mode I see 50% of the CPU is used by executable.可执行文件使用。 I wanted to know if this is something related with my code or something related with how works.工作方式有关。

I found a nice response to a similar question here: how to debug node.js causing 100% cpu usage?

But I cannot follow the indicated steps because I'm developing using angular, and angular is started by running ng serve .

The documentation of ng serve is here: https://angular.io/cli/serve but I can't see anything to send additional parameters to . 发送附加参数的内容。 Even more, if I try to do ng serve --prof an error is generated.

What else can I do in order to profile the execution of node.js?

Thanks for your time

使用ng脚本的路径作为node二进制文件的参数,如下所示:

node --prof ./node_modules/@angular/cli/bin/ng serve

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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