【问题标题】:How to analyze startup performance when using jetty-maven-plugin:run使用 jetty-maven-plugin:run 时如何分析启动性能
【发布时间】:2016-01-04 14:23:31
【问题描述】:

我正在使用 java 开发一个 java web 应用程序。为了开发这个应用程序,我使用 jetty 作为应用程序服务器。到现在以下版本:

<plugin>
   <groupId>org.mortbay.jetty</groupId>
   <artifactId>jetty-maven-plugin</artifactId>
   <version>7.4.2.v20110526</version>
</plugin>

在应用程序进行一些更改后,我决定使用以下内容更改我的码头版本:

<plugin>
   <groupId>org.eclipse.jetty</groupId>
   <artifactId>jetty-maven-plugin</artifactId>
   <version>9.2.13.v20150730</version>
</plugin>

但我注意到在执行 jetty:run 期间性能不足。

我注意到它失去了将近一分钟

2015-10-07 12:59:11.863:INFO:oejs.Server:main: jetty-9.2.13.v20150730

我怎么能理解为什么?

更新 1

我认为我的问题可能与以下类似:

Jetty startup delay due to scanning

然后我想使用快速启动模块来解决我的问题,这可以使用 jetty-embedded 吗?

【问题讨论】:

标签: java embedded-jetty maven-jetty-plugin


【解决方案1】:

您的问题确实很可能是由扫描引起的。您找到的链接包含有用的信息。

我还刚刚更新了 jetty-maven-plugin 的文档,以明确您还可以使用插件设置容器和 webapp jar 扫描的模式。页面在这里:https://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#configuring-your-webapp,但 CI 系统需要一点时间才能推出更新(查找有关设置 containerIncludeJarPattern 和 webInfIncludeJarPattern 的项目)。

正如文档在“effectiveWebXml”目标下已经提到的那样,使用 maven 插件显式使用 quickstart 并不合适。

一月

【讨论】:

    猜你喜欢
    • 2017-11-22
    • 2011-06-10
    • 2015-06-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-23
    • 1970-01-01
    • 2011-01-31
    相关资源
    最近更新 更多