From fe659a60179c5816f888585894faa6d4134ec3cc Mon Sep 17 00:00:00 2001 From: Dave Pacheco Date: Wed, 1 Aug 2012 10:04:27 -0700 Subject: [PATCH] update profiling blog post to use shell redirection instead of -o --- doc/blog/Uncategorized/profiling-node-js.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/blog/Uncategorized/profiling-node-js.md b/doc/blog/Uncategorized/profiling-node-js.md index 7c3930c757..abb51da26e 100644 --- a/doc/blog/Uncategorized/profiling-node-js.md +++ b/doc/blog/Uncategorized/profiling-node-js.md @@ -11,8 +11,8 @@ It's incredibly easy to visualize where your Node program spends its time using
  • Run your Node.js program as usual.
  • In another terminal, run:
    -$ dtrace -o stacks.out -n 'profile-97/execname == "node" && arg1/{
    -    @[jstack(100, 8000)] = count(); } tick-60s { exit(0); }'
    +$ dtrace -n 'profile-97/execname == "node" && arg1/{ + @[jstack(150, 8000)] = count(); } tick-60s { exit(0); }' > stacks.out This will sample about 100 times per second for 60 seconds and emit results to stacks.out. Note that this will sample all running programs called "node". If you want a specific process, replace execname == "node" with pid == 12345 (the process id).
  • Use the "stackvis" tool to transform this directly into a flame graph. First, install it: