Skip to content

Instantly share code, notes, and snippets.

@dineshsprabu
Created July 19, 2018 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dineshsprabu/6df0161cd533da8710364287d9a56bde to your computer and use it in GitHub Desktop.
Save dineshsprabu/6df0161cd533da8710364287d9a56bde to your computer and use it in GitHub Desktop.
Node Profiling and Inspecting

Profiling

Below command would create a log.

node --prof app.js

To understand the log you would need to pass it to --prof-process.

node --prof-process <ABOVE-CREATED-LOG>

Node Inspect with dev tools

Run

node --inspect app.js
  1. Open chrome, chrome://inspect
  2. Click on the app.
  3. Goto console for debugging.
  4. Profiler and Memory can be used for CPU and Memory profiling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment