java - 关于 jrat 分析的问题

标签 java eclipse profiling

我正在编写一个作为服务运行的代码。基本上它监听输入并相应地产生输出。

我正在尝试使用 jrat 分析包。 [我们没有 Jprofiler 的许可证,我无法设置试用版以正常工作]。

我按照此处的说明进行操作: http://transferer.blogspot.com/2009/12/how-to-use-jrat-in-eclipse.htmlhttp://digiassn.blogspot.com/2008/01/java-using-jrat-under-eclipse.html

我正在获取 .jrat 输出文件,但我看到的只是:

001_JRat-LOG.jrat desktop% cat 001_JRat-LOG.jrat viewer="org.shiftone.jrat.ui.viewer.SimpleTextOutputViewBuilder" JRat:INFO (Oct/18 17:15:32,769) (main) RuntimeContextImpl - logfile created JRat:INFO (Oct/18 17:15:32,769) (main) RuntimeContextImpl - Running JRat version 1-alpha2 - built on July 31 2006 JRat:INFO (Oct/18 17:15:32,770) (main) Settings - string 'jrat.factory' = 'org.shiftone.jrat.provider.silent.SilentMethodHandler' JRat:INFO (Oct/18 17:15:32,771) (main) RootFactory - JRat creating root handler factory... JRat:INFO (Oct/18 17:15:42,451) (JRat-JMX-Poller) WaitingJmxRegistry - registering 6 mbean(s) JRat:INFO (Oct/18 17:15:42,451) (JRat-JMX-Poller) ServerJmxRegistry - registerMBean org.shiftone.jrat.core.jmx.info.JRatInfo@c5e9c shiftone.jrat:service=org.shiftone.jrat.core.jmx.info.JRatInfo JRat:INFO (Oct/18 17:15:42,453) (JRat-JMX-Poller) ServerJmxRegistry - registerMBean org.shiftone.jrat.util.log.LoggingManager@11756a4 shiftone.jrat:service=org.shiftone.jrat.util.log.LoggingManager JRat:INFO (Oct/18 17:15:42,453) (JRat-JMX-Poller) ServerJmxRegistry - registerMBean org.shiftone.jrat.core.jmx.benchmark.Benchmark@b301f2 shiftone.jrat:service=org.shiftone.jrat.core.jmx.benchmark.Benchmark JRat:INFO (Oct/18 17:15:42,453) (JRat-JMX-Poller) ServerJmxRegistry - registerMBean Transformer[AsmInjectorStrategy(uses http://asm.objectweb.org)] shiftone.jrat:service=org.shiftone.jrat.inject.bytecode.Transformer JRat:INFO (Oct/18 17:15:42,454) (JRat-JMX-Poller) ServerJmxRegistry - registerMBean org.shiftone.jrat.core.shutdown.ShutdownRegistry@4be2cc shiftone.jrat:service=org.shiftone.jrat.core.shutdown.ShutdownRegistry JRat:INFO (Oct/18 17:15:42,454) (JRat-JMX-Poller) ServerJmxRegistry - registerMBean FileOutputRegistry[PrintWriter[001_JRat-LOG.jrat]] shiftone.jrat:service=org.shiftone.jrat.core.output.FileOutputRegistry JRat:INFO (Oct/18 17:15:48,825) (JRat-Shutdown) ShutdownRegistry - shutting down...[Transformer[AsmInjectorStrategy(uses http://asm.objectweb.org)], FileOutputRegistry[PrintWriter[001_JRat-LOG.jrat]]] JRat:INFO (Oct/18 17:15:48,826) (JRat-Shutdown) ShutdownRegistry - shutting down FileOutputRegistry[PrintWriter[001_JRat-LOG.jrat]]... JRat:INFO (Oct/18 17:15:48,826) (JRat-Shutdown) FileOutputRegistry - closeFileOutputs [PrintWriter[001_JRat-LOG.jrat]] JRat:INFO (Oct/18 17:15:48,826) (JRat-Shutdown) FileOutputRegistry - closing : PrintWriter[001_JRat-LOG.jrat] JRat:INFO (Oct/18 17:15:48,826) (JRat-Shutdown) FileOutputPrintWriter - closing JRat:INFO (Oct/18 17:15:48,826) (JRat-Shutdown) FileOutputRegistry - remove PrintWriter[001_JRat-LOG.jrat]

以前有人在 Linux 上使用过它吗?我在想,因为我将其作为服务运行..运行我的应用程序后,我点击终止按钮来停止我的应用程序[与其他应用程序相反,这些应用程序可能在工作完成后自行终止]..这可能不会使应用程序正常退出因此 jrat 不会产生转储?但这只是一个盲目的猜测。

谢谢

附: 我正在使用 eclipse Java版本1.6.0_13

编辑: 无法使其正常工作,但尝试了 Visualvm,效果还不错。 然而,需要分析远程应用程序,[因为我想分析我的服务的一部分,并通过简单的方法来强调这部分代码并获取其编号来自服务器本身],所以将寻找易于远程使用的东西.

最佳答案

您可以尝试 BTrace,它作为代理安装在您正在使用的应用程序上。 BTrace 可以与远程可视化工具结合使用,以实现所收集数据的实时和历史图表。

请参阅以下问题了解更多信息:High Execution time on java methods

关于java - 关于 jrat 分析的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3964608/

相关文章:

javascript - 跨平台、跨浏览器的 Javascript 性能分析

java - android - 检测低网络信号,依赖哪个值

java - 图像尺寸变小

java - eclipse 错误?仅使用默认情况打开 null

java - 在 Eclipse 中导入项目

python - 交互式 Python : cannot get `%lprun` to work, 尽管 line_profiler 已正确导入

java - 如何使用java只列出目录中的N个文件

java - 如何使用maven更改tomcat服务器的端口号

java - 如何在Eclipse中为非Android Java项目使用Proguard?

c# - 分析 asp.net mvc 代码的最佳工具是什么?