开发者

How can I profile threads in Java?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜