How to enable wall-clock profiling for Intellij Async Profiler?

1.1k Views Asked by At

I'd like to measure how much time my app spends in the database.

I've added the CPU Profiler to Intellij's Settings / Build / Java Profiler, but by default it shows the code with most CPU cycles, which is useless for me since the JDBC driver basically sleeps while the response is received.

Sounds like Wall-clock profiling is the way to go, however I don't know how to enable that in Intellij's CPU Profiler configuration window. The README says -e wall, while Intellij's Agent Options look totally different: threads,interval=1ms,framebuf=15000000. How can I configure Intellij's Async Profiler to use Wall-clock please?

1

There are 1 best solutions below

1
On

The answer, according to the comment above by y.bedrov is to use the "event=wall" option. For me, using Ultimate 2020.1 with the defaults already set up...

IntelliJ IDEA / Preferences... / Build, Execution, Deployment / Java Profiler / CPU Profiler / Agent options: threads,interval=1ms,framebuf=15000000,event=wall

I'm putting it in the form of an answer not because I want to get the credit, but because when I looked at this question originally, I almost ignored it because there was no answer. Then I noticed that the answer was in a comment.