Java profiling - how can I get a method by method analysis of my application?

后端 未结 7 1274
挽巷
挽巷 2020-12-29 03:01

I want to run my Java app and for a given workload be able to see:

  • how many times a given function was called
  • how expensive each function call is in
7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 03:45

    If you are willing to spend a little money,

    JProfiler: http://www.ej-technologies.com/products/jprofiler/overview.html

    is very good, it shows you % of time used, absolute time used, and # of invocations down to the method level. It understands EJB calls, web service calls, and will even show the SQL of jdbc calls. I use it frequently to find performance issues.

    It has memory profiling too, but I find the cpu profiling much more useful.

提交回复
热议问题