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.

Incorrect wall time measures

Moderators: Vladimir Kondratyev, Anton Katilin

Incorrect wall time measures

Postby D ten Hove » Tue Jun 07, 2016 3:16 pm

I'm running the YourKit Java profiler on our OSGi application and I am getting CPU measurement results that simply do not match reality.

I am profiling using the "tracing" method, with the default options (walltime=*). Our Java application is running on a Windows 10 machine, with the profiling agent attached at startup. I remotely attach the profiler from a different machine (using the YourKit Java Profiler UI) to the running Java process.

Because of the difference in time we experienced when using the application and the profiler results, I ended up putting the following code in a certain method (only there, just to try it):

Code: Select all
System.out.println(System.currentTimeMillis());
try {
   // Do the work
} finally {
   System.out.println(System.currentTimeMillis());
}


For this method, the profiler will state it takes on average 201 milliseconds for 16 calls. My simple printlns indicate an average of 345 milliseconds (for exactly the same 16 calls).

I cannot figure out where this discrepancy is coming from. Any help is greatly appreciated.
D ten Hove
 
Posts: 4
Joined: Tue Jun 07, 2016 3:01 pm

Re: Incorrect wall time measures

Postby Anton Katilin » Tue Jun 07, 2016 3:25 pm

Hi,

Could you please provide the snapshot file demonstrating the problem and indicate the problematic call e.g. with a screenshot. Please feel free to mail these to support@yourkit.com if you cannot share them in a public forum thread.
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Postby Anton Katilin » Tue Jun 07, 2016 3:29 pm

P.S. Could you please also check whether you have the same problem with CPU sampling instead.
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Postby D ten Hove » Tue Jun 07, 2016 3:41 pm

Hello Anton,

thanks for your help. I will email you a snapshot momentarily. I have also attempted to profile using CPU sampling, but this indicated even smaller average times, so I gave up on that pretty fast.
D ten Hove
 
Posts: 4
Joined: Tue Jun 07, 2016 3:01 pm

Re: Incorrect wall time measures

Postby Anton Katilin » Wed Jun 08, 2016 7:44 am

Hi,

I'm afraid I cannot see your email. Could you please re-send and tell what the subject line is.
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Postby D ten Hove » Mon Jun 13, 2016 7:21 am

Hello Anton,

I have sent the snapshot using wetransfer this time. The zip file is password protected, I sent you the password in a separate e-mail. Please let me know if/when you have correctly received them.

Thanks
D ten Hove
 
Posts: 4
Joined: Tue Jun 07, 2016 3:01 pm

Re: Incorrect wall time measures

Postby D ten Hove » Mon Jun 13, 2016 8:12 am

Almost forgot: The subject line for the e-mail with the password is "snapshot", but I included the URL for this post. The subject line for the e-mail from wetransfer must be something we-transfer related. Again, the message of that e-mail should include the URL for this post.
D ten Hove
 
Posts: 4
Joined: Tue Jun 07, 2016 3:01 pm

Re: Incorrect wall time measures

Postby Anton Katilin » Mon Jun 13, 2016 11:24 am

Hi,

Thank you. We've answered you by email. In short: we've got only the email with the password, but cannot see the email with the download link. Could you please resend, or, even better, send the link as a reply to our email.
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Postby Anton Katilin » Mon Jun 13, 2016 11:48 am

We've got the file. We've sent you additional questions by email.
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Postby Anton Katilin » Thu Jul 28, 2016 8:00 pm

Update: could you please check whether the latest EAP build improves the situation: https://www.yourkit.com/eap
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

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