关于jrat profiling的问题

时间:2010-10-19 00:45:46

标签: 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-L​​OG.jrat桌面%cat   001_JRat-L​​OG.jrat   观察者= “org.shiftone.jrat.ui.viewer.SimpleTextOutputViewBuilder”   JRat:INFO(Oct / 18 17:15:32,769)(主要)   RuntimeContextImpl - 创建日志文件   JRat:INFO(Oct / 18 17:15:32,769)(主要)   RuntimeContextImpl - 运行JRat   版本1-alpha2 - 建于7月31日   2006 JRat:INFO(Oct / 18 17:15:32,770)   (主要)设置 - 字符串   'jrat.factory'=   'org.shiftone.jrat.provider.silent.SilentMethodHandler'   JRat:INFO(Oct / 18 17:15:32,771)(主要)   RootFactory - JRat创建root   处理厂... JRat:INFO(10月18日   17:15:42,451)(JRat-JMX-Poller)   WaitingJmxRegistry - 注册6   mbean(s)JRat:INFO(10月18日   17:15:42,451)(JRat-JMX-Poller)   ServerJmxRegistry - registerMBean   org.shiftone.jrat.core.jmx.info.JRatInfo@c5e9c   shiftone.jrat:服务= 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:服务= 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:服务= org.shiftone.jrat.core.jmx.benchmark.Benchmark   JRat:INFO(Oct / 18 17:15:42,453)   (JRat-JMX-Poller)ServerJmxRegistry -   registerMBean   变压器[AsmInjectorStrategy(用途   http://asm.objectweb.org)]   shiftone.jrat:服务= 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:服务= org.shiftone.jrat.core.shutdown.ShutdownRegistry   JRat:INFO(Oct / 18 17:15:42,454)   (JRat-JMX-Poller)ServerJmxRegistry -   registerMBean   FileOutputRegistry [PrintWriter的[001_JRat-L​​OG.jrat]]   shiftone.jrat:服务= org.shiftone.jrat.core.output.FileOutputRegistry   JRat:INFO(Oct / 18 17:15:48,825)   (JRat-Shutdown)ShutdownRegistry -   关闭   下来... [变压器[AsmInjectorStrategy(用途   http://asm.objectweb.org)],   FileOutputRegistry [PrintWriter的[001_JRat-L​​OG.jrat]]]   JRat:INFO(Oct / 18 17:15:48,826)   (JRat-Shutdown)ShutdownRegistry -   关闭   FileOutputRegistry [PrintWriter的[001_JRat-L​​OG.jrat] ...   JRat:INFO(Oct / 18 17:15:48,826)   (JRat-Shutdown)FileOutputRegistry -   closeFileOutputs   [PrintWriter的[001_JRat-L​​OG.jrat]]   JRat:INFO(Oct / 18 17:15:48,826)   (JRat-Shutdown)FileOutputRegistry -   关闭:   PrintWriter的[001_JRat-L​​OG.jrat]   JRat:INFO(Oct / 18 17:15:48,826)   (JRat-Shutdown)FileOutputPrintWriter    - 结束JRat:INFO(10月18日17:15:48,826)(JRat-Shutdown)   FileOutputRegistry - 删除   PrintWriter的[001_JRat-L​​OG.jrat]

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

由于

P.S: 我正在使用eclipse Java版本1.6.0_13

编辑: 无法使这个工作,但尝试Visualvm而不是工作正常。 然而,需要配置一个远程应用程序,[因为我想要分析我的一部分服务和简单​​的方法来强调代码的一部分,并从服务器本身得到它的数量]所以将寻找易于远程使用的东西

2 个答案:

答案 0 :(得分:0)

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

有关详细信息,请参阅以下问题:High Execution time on java methods

答案 1 :(得分:0)

jrat在过去几年里并不活跃。

也许最好的开源方法是使用AspectJ的JVMTI代理,如以下帖子中所述:http://andrewclement.blogspot.com.br/2009/02/load-time-weaving-basics.html

您可以编写将在JVM加载时应用于类的方面。

相关问题