How to profile server in Eclipse GWT project?
I created a standard GWT project in Eclipse and now I have a huge performance pro开发者_StackOverflow中文版blem in the server side code. I can only find instructions on how to use Speedtracer to profile the actual GWT application, but I want to configure Eclipse to profile the server. I am using the server from the GWT SDK.
If you want to profile your server-side code you can pretty much use any standard Java profiling tool. If you setup your project for remote debugging/profiling you can attach pretty much any Java profiler. You could add the following arguments to your project launch settings to enable it for remote debugging:
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=4321,suspend=y
Where "4321" is the port that you need to specify your remote profiling/debugging application to attach itself to.
If you have access to JProfiler you can just attach the profiler to your running JVM instance without any extra work. It also has some remote/server integration features and can even be setup to profile your client-side GWT code as well. See link for some pretty good information on profiling GWT in Eclipse.
EDIT:
See the JPDA documentation for more information on remote debugging options that are available and how to configure them. The examples near the bottom are quite well explained.
精彩评论