Via Profiler
- Install globally
npm install -g profiler - Start your process with
node --profthis will create av8.logfile - Run
/usr/local/lib/node_modules/profiler/build/Release/nprof v8.logthis 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/