Flame is part of the Node Clinic suit of tools. To install flame, simply install Node Clinic like so:

npm install -g clinic

After installing, we can check if Flame has been installed with running the clinic flame command with the --help flag.

clinic flame --help

It should print something similar to the following:

Clinic Flame - v3.4.8 (0x v4.7.2)

  clinic flame helps you find synchronous bottlenecks
  by creating a flamegraph visualization that assists in identifying
  function calls that may be blocking the event loop.

  For more information see the 0x readme,

  To run clinic flame

    clinic flame -- node server.js

  If profiling on a server, it can be useful to only do data collection:

    clinic flame --collect-only -- node server.js

  You can then transfer the data and visualize it locally:

    clinic flame --visualize-only

  -h | --help                Display Help
  -v | --version             Display Version
  --collect-only             Do not process data on terminiation
  --visualize-only datapath  Build or rebuild visualization from data

Up next

Getting ready