Time (ms) call by thread view Vs Time(ms) Threads view
-
- Posts: 21
- Joined: Mon Feb 21, 2011 1:10 pm
Time (ms) call by thread view Vs Time(ms) Threads view
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.
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.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Time (ms) call by thread view Vs Time(ms) Threads view
Hello,
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.
Best regards,
Anton
It shows results based on CPU profiling, i.e. on either sampling or tracing.It seems always not clear for me what is the difference between CPU time in call_by_thread view
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.
It shows CPU time of the thread since its start.the time in Threads view
If you need the total CPU time per thread, use the Threads view.Which one should i consider for comparing CPU usage by each thread of my application.
Best regards,
Anton
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Time (ms) call by thread view Vs Time(ms) Threads view
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.
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.
-
- Posts: 21
- Joined: Mon Feb 21, 2011 1:10 pm
Re: Time (ms) call by thread view Vs Time(ms) Threads view
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.
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.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Time (ms) call by thread view Vs Time(ms) Threads view
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?
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?
-
- Posts: 21
- Joined: Mon Feb 21, 2011 1:10 pm
Re: Time (ms) call by thread view Vs Time(ms) Threads view
Hi,
Yes that is exactly what we are looking for.
How should i proceed ?
Yes that is exactly what we are looking for.
How should i proceed ?
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Time (ms) call by thread view Vs Time(ms) Threads view
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.
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.
-
- Posts: 21
- Joined: Mon Feb 21, 2011 1:10 pm
Re: Time (ms) call by thread view Vs Time(ms) Threads view
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
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
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Time (ms) call by thread view Vs Time(ms) Threads view
As I wrote, you cannot do it now, but we've added a feature request. Please read my previous posting.
-
- Posts: 21
- Joined: Mon Feb 21, 2011 1:10 pm
Re: Time (ms) call by thread view Vs Time(ms) Threads view
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
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
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Time (ms) call by thread view Vs Time(ms) Threads view
That particular view neither can be exported to csv from UI. As I wrote, we've added a request to provide this functionality.
-
- Posts: 5
- Joined: Thu Feb 09, 2017 4:53 pm
Re: Time (ms) call by thread view Vs Time(ms) Threads view
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
>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
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: wolTime (ms) call by thread view Vs Time(ms) Threads vie
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
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