Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically start profiling right away #10

Open
stephanos opened this issue Dec 13, 2013 · 15 comments
Open

Automatically start profiling right away #10

stephanos opened this issue Dec 13, 2013 · 15 comments

Comments

@stephanos
Copy link

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.

@krasa
Copy link
Owner

krasa commented Dec 13, 2013

True, but I do not think VisualVM supports it.

@smile-on
Copy link

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?

@krasa
Copy link
Owner

krasa commented Jan 15, 2014

Can you screenshot such settings?

@smile-on
Copy link

Please see attach. My wish is to start VVM with some "preset".
vvm-preset-options

On Wed, Jan 15, 2014 at 12:45 PM, Vojtěch Krása [email protected]:

Can you screenshot such settings?


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-32389688
.

@krasa
Copy link
Owner

krasa commented Jan 15, 2014

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.

@smile-on
Copy link

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.

@krasa
Copy link
Owner

krasa commented Jan 15, 2014

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 :)

@lyqscmy
Copy link

lyqscmy commented Apr 24, 2017

@krasa Why the options are grey?I have restarted IDEA and config the path.
image

@krasa
Copy link
Owner

krasa commented Apr 24, 2017

Maybe for the same reason as Coverage... dunno.

@sourav-dey
Copy link

Is intellij 2017 not supported with visual vm plugin?
I get the same problem as above, greyed out, but my coverage is not.

@krasa
Copy link
Owner

krasa commented Apr 26, 2017

Why do you even write into this issue? #14

@sourav-dey
Copy link

Problem #14 is a gradle problem... Mine is maven build tool....

@krasa
Copy link
Owner

krasa commented Apr 27, 2017

well, let's create another issue then.

@pc-mmautner
Copy link

I believe this is solved by using the Startup Profiler plugin:

https://visualvm.github.io/startupprofiler.html

I got it to work

@neilabdev
Copy link

+1 - I'm running IntelliJ 2018.2 and the option to run with VisualVM greyed out for a gradle/grails project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants