Open stephanos opened 10 years ago
True, but I do not think VisualVM supports it.
I experienced similar issues with using the plugin. My use case: profile a JUnit test case execution from IDEA 13.
1) at the time it starts VisualVM (VVM) my test almost finished. And I need time to press profile button in VVM. Your response, it is not possible to do. My guess we can put sleep() at the begging of the unit test (temporary :)
2) default on-fly profiling creates hot spots in code and almost useless CPU time stats. There is a work around to customize on-fly profiling under check-box "Settings" in VVM but I don't see how to ask plugin to start test with custom profile settings right way. Can you add this feature?
Can you screenshot such settings?
Please see attach. My wish is to start VVM with some "preset".
On Wed, Jan 15, 2014 at 12:45 PM, Vojtěch Krása notifications@github.comwrote:
Can you screenshot such settings?
— Reply to this email directly or view it on GitHubhttps://github.com/krasa/VisualVMLauncher/issues/10#issuecomment-32389688 .
Seriously, VisualVM does not support anything but opening the tab. Anything more would require to write a VisualVM plugin which could be called directly from IntelliJ. But in case of profiling from the very beginning of the application, I doubt it is possible at all.
Anyway, sleep() is fine, System.in.read(); is better.
OK, now I kind of see the issue. The solution may look like: IntelliJ -> IntelliJ plugin (1) -> VisualVM -> VisualVM plugin (2)
plugin (1) starts VisualVM and waits on plugin (2) for message . plugin (2) loads proper "profile settings" and tells (1) to go.
I agree, all this mess just to avoid System.in.read() is not worth it. Thank you for the tip!
Could you tell if plugin (2) would be able to kick CPU profiling? That would open up opportunity for "integration" between VisualVM and IntelliJ IDEA.
I doubt it, but it would be better to ask on VisualVM mailing list. Currently what this and Eclipse plugin do, is executing visualvm.exe with --openid=12345 parameter. It could be possible to send any parameter needed and make visualvm do anything, but someone would need to implement such additional behaviours :)
@krasa Why the options are grey?I have restarted IDEA and config the path.
Maybe for the same reason as Coverage... dunno.
Is intellij 2017 not supported with visual vm plugin? I get the same problem as above, greyed out, but my coverage is not.
Why do you even write into this issue? https://github.com/krasa/VisualVMLauncher/issues/14
Problem #14 is a gradle problem... Mine is maven build tool....
well, let's create another issue then.
I believe this is solved by using the Startup Profiler plugin:
https://visualvm.github.io/startupprofiler.html
I got it to work
+1 - I'm running IntelliJ 2018.2 and the option to run with VisualVM greyed out for a gradle/grails project.
It would be great if I could just set "Profile CPU" or "Profile RAM" before I launch the application / tests. Currently I have to do this manually and I always miss the first few seconds of execution.