node --cpu-prof --cpu-prof-dir=prof server.js

Category: Node.js & npm/yarn

node --cpu-prof --cpu-prof-dir=prof server.js

Profile CPU usage of a Node process

Samples where the process spends CPU time and writes a .cpuprofile into the prof directory for DevTools or speedscope. Shows hot functions, helping optimize slow request paths. Keep runs short since profiling slows execution.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.