require-time-tree
Calculate a tree object for all require statements with timing
Usage
npm install require-time-tree
var requireTree = ;// This clears any previous tree and "starts fresh". This overrides the// underlying Module._load function to keep this accounting.requireTreestart;;;;;;// Restore the original Module._load functionrequireTree;// Get the current treevar tree = requireTree;// Pretty-print the tree formatted nicelyrequireTree;// Print the raw treeconsole;
Pretty formatted output
-> util 0.000s
-> console 0.000s
-> http 0.009s
-> fs 0.000s
-> ../tests/lib/foo 0.001s
-> ./bar 0.000s
-> ./baz 0.000s
JSON formatted tree
License
MIT License