Via Profiler
- Install globally
npm install -g profiler
- Start your process with
node --prof
this will create av8.log
file - Build
nprof
by running/Users/balupton/.nvm/v0.8.12/lib/node_modules/profiler/tools/build-nprof
- Run
/Users/balupton/.nvm/v0.8.12/lib/node_modules/profiler/nprof
this will read the v8.log profile and give you nice ouput
Via NodeTime
- Install to your app
npm install nodetime
- Include in your app
require('nodetime').profile()
- Follow the instructions it will output to console
Via Node Inspector
No longer supported unfortunately
- Install to your app
npm install webkit-devtools-agent
- Include in your app
agent = require('webkit-devtools-agent')
- Activate the agent:
kill -SIGUSR2 <your node process id>
- Access the agent via the appropriate link
- Benchmark a ton of requests to your server
ab -n 100000 -c 1 http://127.0.0.1:9778/
- Internal debugger http://nodejs.org/api/debugger.html