如何在Java中分析线程? [英] How can I profile threads in Java?

查看:150
本文介绍了如何在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 application.

有关如何解决这个问题的建议吗?

Any suggestions on how to go about this?

推荐答案

我个人使用YourKit java profiler。它有一个出色的线程分析器工具,以图形方式显示每个线程在任何给定时间的状态,相对于彼此(以及其他)。值得一看

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

这篇关于如何在Java中分析线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆