Incorrect wall time measures

Questions about YourKit Java Profiler
Post Reply
D ten Hove
Posts: 4
Joined: Tue Jun 07, 2016 3:01 pm

Incorrect wall time measures

Post by D ten Hove »

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.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Post by Anton Katilin »

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 [email protected] if you cannot share them in a public forum thread.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Post by Anton Katilin »

P.S. Could you please also check whether you have the same problem with CPU sampling instead.
D ten Hove
Posts: 4
Joined: Tue Jun 07, 2016 3:01 pm

Re: Incorrect wall time measures

Post by D ten Hove »

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.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Post by Anton Katilin »

Hi,

I'm afraid I cannot see your email. Could you please re-send and tell what the subject line is.
D ten Hove
Posts: 4
Joined: Tue Jun 07, 2016 3:01 pm

Re: Incorrect wall time measures

Post by D ten Hove »

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

Post by D ten Hove »

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.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Post by Anton Katilin »

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: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Incorrect wall time measures

Post by Anton Katilin »

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

Re: Incorrect wall time measures

Post by Anton Katilin »

Update: could you please check whether the latest EAP build improves the situation: https://www.yourkit.com/eap
Post Reply