![]() In the Log folder field, specify the path to the folder where the recorded logs will be stored, log files are named isolate. Switch to the V8 Profiling tab and select the Record CPU profiling info checkbox. In the Edit Configurations dialog that opens, click the Add button ( ) on the toolbar and select Node.js from the list.įrom the list, select the Node.js run configuration to activate CPU Profiling in or create a new configuration as described in Running and debugging Node.js. Alternatively, select Edit Configurations from the list on the toolbar. To invoke V8 CPU profiling on application start, you need to specify additional settings in the Node.js run configuration.įrom the main menu, select Run | Edit Configurations. Measurements are made not only for the work of your code, but also for the activities performed by the engine itself, such as compilation, calls of system libraries, optimization, and garbage collection. The profiler takes snapshots at certain intervals that are called ticks. Node.js CPU profiling in WebStorm is based on the V8 built-in CPU profiler, which provides information about the execution of your code and the behavior of the JavaScript engine itself including garbage collection cycles, compilation and re-compilation, and code optimization. For more details about plugins, see Managing plugins.ĬPU profiling helps you get a better understanding of which parts of your code take up the most CPU time, and how your code is executed and optimized by the V8 JavaScript engine. Press Ctrl+Alt+S to open the IDE settings and select Plugins. Make sure the Node.js plugin is enabled in the settings. ![]() You can also open and explore snapshots captured in Google Chrome DevTools for your client-side code. With WebStorm, you can capture and analyze CPU profiles and heap snapshots for your Node.js applications using V8’s sample-based profiler.
0 Comments
Leave a Reply. |