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

Profile short-lived application

Moderators: Vladimir Kondratyev, Anton Katilin

Profile short-lived application

Postby Chris » Fri Aug 13, 2004 7:28 am

I've just grabbed a copy of the 3.0 EAP and am trying to figure out if it's possible to connect to and profile an application that only runs for a second or two (in my case a unit test it's a unit test that I'm running from IDEA). Doesn't seem like it is?

Currently it seems that I can only connect to an already running application. It would be nice to have an option for YourKit to wait until it received a signal when the unit test started so the entire execution could be profiled.
Chris
 
Posts: 6
Joined: Fri Aug 13, 2004 7:15 am

Re: Profile short-lived application

Postby Vladimir Kondratyev » Fri Aug 13, 2004 8:10 am

Chris wrote:I've just grabbed a copy of the 3.0 EAP and am trying to figure out if it's possible to connect to and profile an application that only runs for a second or two (in my case a unit test it's a unit test that I'm running from IDEA). Doesn't seem like it is?

Currently it seems that I can only connect to an already running application. It would be nice to have an option for YourKit to wait until it received a signal when the unit test started so the entire execution could be profiled.


yjpagent DLL has numerous parameters that allow to start CPU or memory profiling just from JVM startup and capture snapshot on JVM exit.

Please try something like that yjpagent:sampling,onexit=cpu
It should start CPU profiling (with sampling method) and CPU snapshot will be captured on JVM exit. More about agent's option you can read in output of yjpagent:help (current documentation is a bit outdated)
Vladimir Kondratyev
 
Posts: 1444
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Postby Chris » Fri Aug 13, 2004 10:13 am

Ahh I see, thanks for the pointer (and the quick response). Looks like this will work fine when I run YourKit standalone, however I still can't see how I have any control over the parameters that get passed to the yjpagent dll when it is called by the IDEA plugin.

I've done a bit of digging and found the ~/.yjp-3.0/ide-integration.config file, but am I right in thinking that this is only used when launching the YourKit UI as a separate process, as opposed to running the profiler from within IDEA?

Is there a way to get a snapshot saved when I click the "Profile" button in IDEA? Or better yet, have the output of the profiler fed directly into an already running instance of the YourKit UI?

Apologies if I'm missing something obvious, it's not clear to me from the docs how I should go about doing this. The only thing I could think of was to specify the -Xrun string as a VM param to a normal 'Run' configuration, i.e. to bypass the plugin completely which gets a bit messy.
Chris
 
Posts: 6
Joined: Fri Aug 13, 2004 7:15 am

Postby Vladimir Kondratyev » Fri Aug 13, 2004 3:34 pm

Chris wrote:Ahh I see, thanks for the pointer (and the quick response). Looks like this will work fine when I run YourKit standalone, however I still can't see how I have any control over the parameters that get passed to the yjpagent dll when it is called by the IDEA plugin.


Chris, plugin for IDEA doesn't allow to specify such "advanced" options yet. We will implement it in one of the next EAP builds (#406 or #407). As temporary workaround I'd suggest you to specify -Xrunyjpagent with necessary option in ordinar IDEA run configuration (user ordinar Run action instead of profiler). Sorry, for temporary inconvenience.
Vladimir Kondratyev
 
Posts: 1444
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany


Return to Java Profiler

Who is online

Users browsing this forum: Bing [Bot], sreejithsree, Yahoo [Bot] and 8 guests