开发者

How can I profile threads in Java?

开发者 https://www.devze.com 2023-02-13 08:00 出处:网络
I have producer and consumer threads in my application and I need to profile them to see the performance of the threads, time taken before each goes to sleep and waits, etc., and take corrective actio

I have producer and consumer threads in my application and I need to profile them to see the performance of the threads, time taken before each goes to sleep and waits, etc., and take corrective action to improve the over all efficiency of the app开发者_如何学Pythonlication.

Any suggestions on how to go about this?


Personally I use YourKit java profiler. It has an excellent thread profiler tool that graphically shows the state of each thread at any given time, relative to one another (among other things). Worth a look

http://www.yourkit.com/overview/index.jsp


There are a number of tools, both free and non-free.
Check out javaperformancetuning.com for both tools and tricks.
From personal experience I can say that VisualVM from snoracle is a good tool and NetBeans has a good profiler.

0

精彩评论

暂无评论...
验证码 换一张
取 消