如何在Eclipse EE Luna中配置Java Web应用程序servlet调用 [英] How to profile a Java web application servlet call in Eclipse EE Luna

查看:151
本文介绍了如何在Eclipse EE Luna中配置Java Web应用程序servlet调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Web应用程序中,即使在开始写入响应之前,servlet也需要几秒钟。我想知道,在servlet执行期间调用哪些方法,每个方法需要什么时间。

In my web application a servlet needs multiple seconds even before it starts to write the response. I would like to find out, which methods are called during servlet execution and what time each method takes.

是否已经在Luna版本中包含了一个分析器用于Java EE开发人员的Eclipse IDE ?如何激活?

Is there a profiler already included in the Luna release of Eclipse IDE for Java EE Developers? How do I activate it?

网络上有很多信息可用,但是接缝名称一直都有变化,所以我无法过滤相关的信息。 p>

There is a lot information available on the web, but it seams names change all the time so I have difficulties to filter the relevant.

推荐答案

JVM Monitor 3.8 可以很好的使用Eclipse Luna,而且使用起来也很简单。

JVM Monitor 3.8 works fine with Eclipse Luna and it is also quite simple to use.


  1. 从eclipse市场下载并安装

  2. 重新启动eclipse

  3. 开始您的应用程序

  4. 通过 窗口打开JVM资源管理器视图>显示视图[>其他]> Java监视器> JVM资源管理器

  5. 找到您的应用服务器进程,右键单击并选择 开始监控

  6. 属性 视图中,查看具有cpu和内存使用情况的图表

  7. 选择 CPU li>
  8. 点击 选择配置式CPU包 (您可以随时使用右键单击更改>属性

  9. 属性 标签的右上角点击 CPU分析 (或者可以称为 恢复CPU分析

  1. download and install from eclipse marketplace
  2. restart eclipse
  3. start your application
  4. open JVM Explorer view via window > show view [> other ]> Java Monitor > JVM Explorer
  5. find your app server process, right click on it and pick Start Monitoring
  6. you should now land in the Properties view and see graphs with cpu and memory usage
  7. select the CPU tab
  8. click on select profiled CPU packages (you can always change them with right click > properties)
  9. in the top right corner of the Properties tab click on Start CPU Profiling (or it may be called Resume CPU Profiling)

现在,您的调用树应该与您的应用程序交互时填充,您可以分析方法调用及其持续时间。输出应如下所示:

Now your call tree should be populated as you interact with your application and you can analyse the method calls and their duration. The output should look like this:

这篇关于如何在Eclipse EE Luna中配置Java Web应用程序servlet调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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