Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Profiling Gradle task with IntelliJ plugin

Moderators: Vladimir Kondratyev, Anton Katilin

Profiling Gradle task with IntelliJ plugin

Postby noziar » Wed Dec 25, 2019 10:14 pm

Hi,

I'm trying to profile a Gradle-based project. The YourKit plugin for IntelliJ only seems to support the "Application" Run/Debug configuration type, not the "Gradle" configuration type (the YourKit icon remains grayed out). What would be the best way to profile a Gradle task (typically the "run" and "test" tasks) ?

Thanks for the great work on YourKit !
noziar
 
Posts: 1
Joined: Wed Dec 25, 2019 10:08 pm

Re: Profiling Gradle task with IntelliJ plugin

Postby echauchot » Fri Feb 07, 2020 2:33 pm

Yourkit is great!
But I must admit that I'm interested in a response too.
I'd like to profile tests run with gradle.
Indeed yourkit icon in the IDE is grayed out when using gradle.
I'd like to run the java agent with my test to avoid attach mode limitations of yourkit.
As specified in the doc I added de VM option -agentpath to my gradle run configuration but only gradle daemon receives the agent, not the gradle workers that actually run the tests.
Is there a way to have gradle support by any other mean?
echauchot
 
Posts: 2
Joined: Fri Feb 07, 2020 10:45 am

Re: Profiling Gradle task with IntelliJ plugin

Postby Anton Katilin » Mon Feb 10, 2020 12:41 pm

Hi,

Please try to specify the -agentpath option via the environment variable JAVA_TOOL_OPTIONS. It should be inherited by child processes. Does this work for you?

Best regards,
Anton
Anton Katilin
 
Posts: 5895
Joined: Wed Aug 11, 2004 8:37 am

Re: Profiling Gradle task with IntelliJ plugin

Postby echauchot » Tue Feb 11, 2020 10:01 am

Hi Anton,
Thanks for the quick reply !
Yes it works and I have put the environnement variable in the run configuration of intelliJ to avoid having it in all the JVMs of my system. I replaces the intellij plugin quite well.
I humbly advice that we make the intellij plugin do this same thing and that you enable this plugin on gradle projects.
echauchot
 
Posts: 2
Joined: Fri Feb 07, 2020 10:45 am


Return to Java Profiler

Who is online

Users browsing this forum: Google [Bot] and 1 guest

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.