An Open Source Node.js performance profiling suite by NearForm.
Demo and detailed documentation: https://clinicjs.org/
npm install -g clinic
As a first step, run the
clinic doctor -- node server.js
Then benchmark your server with
wrk http://localhost:3000 autocannon http://localhost:3000
If you want to run autocannon as soon as your server starts listening you can
--autocannon option using subarg syntax.
clinic doctor --autocannon [ / --method POST ] -- node server.js
Other benchmarking tools like wrk can be started in a similar way using the
# $PORT is the port the server is listening onclinic doctor --on-port 'wrk :$PORT' -- node server.js
Finally shut down your server (Ctrl+C). Once the server process has shutdown
clinic doctor will analyse the collected data and detect what type of issue
you are having. Based on the issue type, it will provide a recommendation for
For example, to debug I/O issues, use
clinic bubbleprof -- node server.js
Then benchmark your server again, just like you did with
Supported Node.js versions
Clinic relies heavily on Node.js core instrumentation available in later versions.
Currently the supported Node.js versions are
Examples and Demos
- A set of simple Doctor examples
- A set of simple Bubbleprof examples
- A MongoDB-based Bubbleprof demo/example
- A Flame demo/example
Report an issue
If you encounter any issue, feel free to send us an issue report at:
When creating an issue, it will be a huge help for us if you upload your
data to the clinic cloud. To do this, use
clinic upload 1000.clinic-doctor
and include the URL that it returns.
For more information use the
clinic doctor --help clinic bubbleprof --help clinic flame --help clinic upload --help clinic ask --help
- The Doctor functionality is provided by the clinic-doctor module.
- The Bubbleprof functionality is provided by clinic-bubbleprof.
- The Flame functionality is provided by clinic-flame.
-h | --help Display Help -v | --version Display Version --debug Do not minify generated files
Each of the tools has a programmable interface which you can read about in their repos.