Debugging & profiling node.js

509 views

Published on

Talk about the different alternatives for debugging and profiling Node.js applications

Published in: Software, Technology, Art & Photos
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
509
On SlideShare
0
From Embeds
0
Number of Embeds
26
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Debugging & profiling node.js

  1. 1. Debugging & profiling Node.js @tomasperezv
  2. 2. https://github.com/tomasperezv/node-debug-and-profiling
  3. 3. Why minimize console.log avoid code changes … ...
  4. 4. Debugging node-inspector
  5. 5. Profiling node --prof file.js node-tick-processor v8.log https://code.google.com/p/v8/wiki/V8Profiler
  6. 6. Profiling node-time
  7. 7. Profiling node-time npm install nodetime require('nodetime').profile({ accountKey: 'account_key', appName: 'application_name' }); // Your app here
  8. 8. Profiling https://github.com/baryshev/look npm install look require('look').start(); // Your app here
  9. 9. Profiling dtrace! http://cs.brown.edu/~dap/helloworld.svg
  10. 10. Profiling // Show system calls made by a running node process dtrace -n ‘syscall:::entry/pid==26442/{}’ // Count system calls made by a running node process dtrace -n 'syscall:::entry/execname == "node"/{@[probefunc]=count();}' dtrace
  11. 11. Profiling dtrace + stackvis = flamegraph dtrace -n 'profile-97/execname == "node" && arg1/{ @[jstack(150, 8000)] = count(); } tick-30s { exit(0); }' > stacks.out gc++filt < stacks.out > demangled.out

×