A tool for easier analysis of Node.js synchronous IO tracebacks.
Node's --trace-sync-io
flag
makes it output tracebacks to stderr when synchronous IO occurs.
However, the traceback spam isn't that easy to read, so that's where this tool comes in.
$ node --trace-sync-io slow_script.js 2>trace.txt
$ node summarize-sync-io.js < trace.txt
By default, writes, require
s and close
s are filtered out.
To not filter them, use the --writes
/--module-loads
/--closes
parameters, respectively.
You can also use --all
to exclude all of those filters from being used.
Add --match=my-module
to filter the result to stacks that have at least one entry
from a module whose path contains my-module
.
By default, module paths in the output only contain the bit after the last node_modules
.
Pass --simplify-paths=false
to disable this.