Use Smart Profiling to start CPU profiling automatically when the Node event loop stalls.
Click Profiler in the Arc launchpad or module selector.
In Arc Profiler, follow these steps:
- In the Hostname field, enter the name of a Linux host where StrongLoop Process Manager (PM) is running.
- In the Port field, enter the port number where StrongLoop PM is listening.
- Click Load.
Arc will display the process IDs (PIDs) of the application running in that PM.
- Select the PIDs for which you want to set smart profiling.
- Click Profile Settings (full). You'll see the Profiler Settings dialog:
- Click Smart to enable smart profiling.
- In the Event Loop Execution Threshold field, enter the number of milliseconds after which profiling will start. If the Node event loop stalls for longer than this, then smart profiling starts automatically.
- In the Max Samples field, enter the maximum number of event loop cycles during which to profile.
- Click OK to close the Profiler Settings dialog and save the settings.
- Click the desired PID on which to do Smart Profiling; the PID box will turn blue.
- Click Start to begin Smart Profiling.
To end Smart Profiling, click Stop.
NOTE: StrongLoop Profiler will save CPU profiles after you set the Smart Profiling settings and click Start; and before you click Stop.
To disable smart profiling:
- Click Full.
- Click OK.