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 !
Profiling Gradle task with IntelliJ plugin
-
- Posts: 2
- Joined: Fri Feb 07, 2020 10:45 am
Re: Profiling Gradle task with IntelliJ plugin
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?
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?
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profiling Gradle task with IntelliJ plugin
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
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
-
- Posts: 2
- Joined: Fri Feb 07, 2020 10:45 am
Re: Profiling Gradle task with IntelliJ plugin
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.
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.