Performance testing plugin

Enable CPU Profiler

To enable YourKit CPU profiler in the IDE, invoke Help | Diagnostic | Enable CPU Profiler.

The profile will be enabled only for the current IDE session until IDE restart. This avoids modification of the phpstorm.vmoptions file and doesn't increase system start time.

2018.3 release introduces Help | Diagnostic | Start Async Profiler option for Linux and macOS. The option enables async profile (that may take a while) and start profiling right away. To stop profiling invoke Help | Diagnostic | Stop Async Profiler. Please use async profiler and change its options only when requested.

image2.png

Provide Performance Summary

To provide performance summary about your hardware, OS, current project, and the file, invoke Help | Settings Summary and select Performance Problem in the Issue Type list. The information is generalized, so any sensitive data won’t be revealed.

image1.png

Analysis of the Indexing Phase

If you experience any issues with IDE indexing performance, enable Help | Diagnostic | Profile indexing and then invoke File | Invalidate caches and restart.

This action will capture the CPU snapshot during the indexing phase on the next project opening.

Execute Performance Script

The Execute Performance Script action provides a convenient way to collect CPU snapshots that help to identify the performance problem.

The Performance Issue Reporter dialog contains predefined scripts for the common scenarios where IDE slow-downs can be detected, as well as lets you write your own scripts.

The scripts allow us to control the sequence of actions that is performed during snapshots capturing and simplify reproducibility.

image1.png

The first script line is created automatically and points to the currently opened file in the editor.

 

After the CPU snapshot is captured, the Performance Summary dialog opens. It lets you submit a support request and open the CPU snapshot in file browser.

Available commands

Command

Usage

Description

%doComplete

%doComplete

Perform completion

%doLocalInspection

%doLocalInspection

Perform "online" inspection run

%goto

%goto line column

Place caret at specified line and column

%inspectCode

%inspectCode extension

Perform batch inspection on files with the specified extension using the currently selected profile (but without Spellchecking)

%openFile

%openFile file

Open file

%pauseProfile

%pauseProfile

Pause internal timer

%startProfile

%startProfile key

Start profiling using key as activity name

%stopProfile

%stopProfile

Stop profiling and save CPU snapshot

%waitTillFinish

%waitTillFinish

Wait till the progress manager has no progress indicator

%reformat

%reformat

Reformat the whole project with the selected profile

%delayType

%delayType <delay int in ms>>|delay text

Type text with the specified delay between key presses

Each command will wait until the corresponding action is finished, so there is no need to insert an intermediate waiter.

It's also possible to invoke actions using %action <action_name>. Note that in this case they don't have waiters. Execution of the script will be continued right after the action is triggered.

3 comments

Enable persistent profiler option does not seem to exist anymore, and Enable profiler throws an error that it can't be enabled.

0

Is there an alternative that works with IntelliJ?

0

I'm using RubyMine 2018.2.1 and the "Help / Diagnostic / Enable CPU Profiler" option is disabled (grayed out)

My build: 
Build #RM-182.3911.41, built on August 7, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

0

Please sign in to leave a comment.

Have more questions?

Submit a request