Profiling a Java Spring application

前端 未结 8 1208
再見小時候
再見小時候 2020-12-12 20:11

I have a Spring application that I believe has some bottlenecks, so I\'d like to run it with a profiler to measure what functions take how much time. Any recommendations to

相关标签:
8条回答
  • 2020-12-12 20:33

    We developed a JMX & Spring AOP based @Profiled annotation which does production monitoring (active invocations, invocations count, time spent during invocations, exceptions count, etc) . Metrics are exposed via JMX and can be collected via Visual VM / JConsole and by monitoring systems ; we developed an Hyperic HQ Plugin.

    This @profiled annotation is packaged with many other JMX extras to ease monitoring of common components (dbcp, util.concurrent, cxf, jms, etc) and proposed under a business friendly Apache Software License at http://code.google.com/p/xebia-france/wiki/XebiaManagementExtras .

    Hope this helps,

    Cyrille (Xebia)

    0 讨论(0)
  • 2020-12-12 20:35

    I recommend VisualVM for general application profiling. It is available in the JDK from version 1.6_10, and imho much faster and usable than Eclipse TPTP.

    (If your Spring application works in an application server (e.g. Tomcat) you could try to deploy it to the tc Server developer edition (available in the STS downloads). It has interesting monitoring capabilities. It seems that tc Server developer edition is not maintained anymore.)

    UPDATE 2019.02.22.: updated VisualVM url (thanks for @Jeff) and tc Server information. Personally I currently use Glowroot for monitoring Spring applications running in an application server.

    0 讨论(0)
提交回复
热议问题