Profile a run
- Use Run › Profile to profile the selected configuration.
- Choose Profile ’…’ from the gutter run icon menu or from the run widget’s More Actions menu.
- Profile Context Configuration (in Find Action…,
⌘⇧A/Ctrl+Shift+A) profiles the program or test at the caret.
Supported runtimes
Setting up the profilers:
- py-spy: the IDE looks next to the project’s interpreter first, then on the search path. Without a package manager it offers
python -m pip install py-spy. - async-profiler: unpack a release from async-profiler releases and put its
bin/asprofon thePATH, or setASYNC_PROFILER_HOMEto the unpacked folder. The IDE cannot install it for you. - perf: install your distribution’s
linux-tools/linux-perfpackage.
cargo run on macOS and Windows, and Maven or Gradle configurations.
Read the results
Each profiled run becomes a snapshot. The last five snapshots stay available as tabs in the Profiler tool window header. Each snapshot has three views:
Double-click a frame or a row to open its source location. Type in Search frames in the header to highlight matching frames in the flame graph and filter the method list.
Snapshots are kept only for the current session; they are cleared when you switch projects or close the window.