Generates package/module-scoped call graph information based on .cpuprofile
files generated from V8's CPU profiler.
Drag and drop .cpuprofile
files onto the web app here, for live
rendering: https://pmuellr.github.io/cp2cg
Here's a sample usage of the web app, dropping a .cpuprofile
file downloaded
from N|Solid:
Generates SVG via viz.js.
Partitions the call graph by "packages" which contain "modules".
Partitioning is determined by the location of the string node_modules
in
the script name, so probably won't work well in a browser, and is far from
perfect for Node.js apps as well.
Colors of modules are based on the hitCount of functions in the module.
Intra-package calls between modules are not shown, nor are calls to Node.js built-in modules, to reduce clutter.
cp2cg blorg.cpuprofile
Generates a blorg.cpuprofile.svg
file in the current directory.
npm install -g https://github.com/pmuellr/cp2cg
This package is licensed under the MIT license. See the LICENSE.md file for more information.
Awesome! We're happy that you want to contribute.
Please read the CONTRIBUTING.md file for more information.