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.

Wait after startSPUProfiling ??

Moderators: Vladimir Kondratyev, Anton Katilin

Wait after startSPUProfiling ??

Postby gbhambri » Mon Aug 10, 2015 9:18 am

I am using framework API to connect to remote host on specific port and profile for my some of the interesting APIs. I wanted to wait for my test case to get over before i call stopCPUProfiling ?? Is there any relevant way to achieve this ?
Posts: 4
Joined: Mon Aug 10, 2015 8:55 am

Re: Wait after startSPUProfiling ??

Postby Anton Katilin » Mon Aug 10, 2015 10:06 am

If you're using the API to start profiling when some test starts (a method enters?), stop profiling when it exits. Or use a low level timer to stop profiling when necessary.

Alternatively, please consider triggers:

For example, you may add a trigger which starts profiling on entering a specified method, sleeps for given number of seconds, then stops profiling and captures a snapshot for further analyzing.

Anyway, please note that the API and the triggers are means to automate profiling tasks, and it makes sense to use them to automate repetitive profiling tasks. If you need to solve a one-time task, please consider using the profiler UI to control profiling, as this may be the simplest, easiest and fastest way to achieve your goal.
Anton Katilin
Posts: 5651
Joined: Wed Aug 11, 2004 8:37 am

Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 16 guests