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.

Time (ms) call by thread view Vs Time(ms) Threads view

Moderators: Vladimir Kondratyev, Anton Katilin

Time (ms) call by thread view Vs Time(ms) Threads view

Postby Afrogeek » Fri May 27, 2011 1:50 pm

Hi,
It seems always not clear for me what is the difference between CPU time in call_by_thread view and the time in Threads view ?
Which one should i consider for comparing CPU usage by each thread of my application.

Thanks.
Afrogeek
 
Posts: 21
Joined: Mon Feb 21, 2011 1:10 pm

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Anton Katilin » Fri May 27, 2011 2:27 pm

Hello,

It seems always not clear for me what is the difference between CPU time in call_by_thread view


It shows results based on CPU profiling, i.e. on either sampling or tracing.

http://www.yourkit.com/docs/95/help/cpu_intro.jsp

It shows CPU time spent in methods which were running while the sampling or tracing was active. The time for a thread is a sum of its top method times during the CPU profiling period.

the time in Threads view


It shows CPU time of the thread since its start.

Which one should i consider for comparing CPU usage by each thread of my application.


If you need the total CPU time per thread, use the Threads view.

Best regards,
Anton
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Anton Katilin » Fri May 27, 2011 2:30 pm

P.S.

Please also note that CPU profiling can measure wall time for specified methods instead of CPU time (see http://www.yourkit.com/docs/95/help/times.jsp ). This means that the time in call trees and other views presenting CPU profiling results is a sum of CPU time for some methods and wall time for others.
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Afrogeek » Fri May 27, 2011 3:30 pm

Hello Anton,
Thanks for your answer.
Another question. Consider that i want to obtain the results corresponding to the threads view.
When i extract the results from the snapshot file using :
java -Dexport.csv -jar YourKit_Java_Profiler_9.5.5.app/lib/yjp.jar -export file Snapshots/
this generates a csv file called call-tree-by-thread.csv. But according to the name of this file, it contains doesn't show the results corresponding to the thread view (CPU time of a thread since it starts).

So how can i get the thread view results from command line?

Thanks.
Afrogeek
 
Posts: 21
Joined: Mon Feb 21, 2011 1:10 pm

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Anton Katilin » Mon May 30, 2011 11:16 am

The Threads view cannot be exported in offline mode because it contains a lot of information which is fully presented using the full featured profiler UI.

We can consider adding offline export of some of that information.

Could you please describe your use case. Will a list of thread names along with thread CPU times be enough?
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Afrogeek » Mon May 30, 2011 12:30 pm

Hi,
Yes that is exactly what we are looking for.
How should i proceed ?
Afrogeek
 
Posts: 21
Joined: Mon Feb 21, 2011 1:10 pm

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Anton Katilin » Mon May 30, 2011 1:21 pm

We've added corresponding feature request.

If you describe your use case and convince us that the feature would be useful for other users, we'll give it a higher priority.
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Afrogeek » Tue May 31, 2011 8:58 am

Hi,
I think it will be very usefull to have the Thread view in the list of possible exported views available on this page :
http://www.yourkit.com/docs/95/help/export.jsp
You didn't told me how i can do it now -....

Thanks
Afrogeek
 
Posts: 21
Joined: Mon Feb 21, 2011 1:10 pm

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Anton Katilin » Tue May 31, 2011 9:59 am

As I wrote, you cannot do it now, but we've added a feature request. Please read my previous posting.
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Afrogeek » Fri Jun 03, 2011 1:32 pm

Hi,
I have a set of snapshot files obtained from the profiler running on server application i am profiling.
Is it possible to extract CPU time per thread ( Thread View) from the GUI profiler using the snapshot file?
You told me this cannot be done from command line. i am not interested in the cumulative time(of methods) obtained when extracting results from call_tree_by_thread.csv file.

any suggetion?
thx
Afrogeek
 
Posts: 21
Joined: Mon Feb 21, 2011 1:10 pm

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby Anton Katilin » Mon Jun 06, 2011 12:45 pm

That particular view neither can be exported to csv from UI. As I wrote, we've added a request to provide this functionality.
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: Time (ms) call by thread view Vs Time(ms) Threads view

Postby philipc » Wed Mar 01, 2017 3:38 pm

Anton,

>Is it possible to extract CPU time per thread ( Thread View) from the GUI profiler using the snapshot file?

My request is to see CPU time per thread at a specific timestamp. This is helpful so I can see, for example, when total CPU is high at 01:23:45 timestamp, and thread 1 is using 80% CPU, and thread 2 is using 20% CPU, I can look at the callstacks for thread 1 and thread 2.

Thanks,
Philip
philipc
 
Posts: 5
Joined: Thu Feb 09, 2017 4:53 pm

Re: wolTime (ms) call by thread view Vs Time(ms) Threads vie

Postby Anton Katilin » Wed Mar 01, 2017 4:14 pm

Hi Philip

To clarify: exactly what output would you like to have?

For example, would the following be sufficient?

<time stamp 1> <thread ID 1> <CPU usage %>
<time stamp 1> <thread ID 2> <CPU usage %>
...
<time stamp 2> <thread ID 1> <CPU usage %>
<time stamp 2> <thread ID 5> <CPU usage %>
...

Best regard,
Anton
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Bing [Bot] and 10 guests