Reputation: 321
It is necessary to see where are the bottlenecks in the large legacy code and the load test harness is unlikely to reveal the real ones so we may end up doing this on production. Is there a profiler for java code which slows down the code by say 10% maximum as opposed to 'several times'? Also it must be possible to easily plug the profiler and easily unplug it restoring the original performance. Is there a profiler close to these requirements?
Upvotes: 1
Views: 270
Reputation: 14309
The best performance monitor I am aware of for Java is Jamon. You will get a Web front end and really nice statistics in addition to a query engine on those statistics. Actually a fantastic project.
"A monitor is a tool used to observe the activities on a system. In general, monitors observe the performance of systems, collect performance statistics, analyze the data, and display results. Some also identify problem areas and suggest remedies." The Art of Computer Systems Performance Analysis
Upvotes: 0
Reputation: 4141
I have used JProfiler to detect the problems in the web app I was developing some time ago. Performance loss really depends on resources you want to monitor (as mindas already mentioned in his answer). From my overall experience it was easy to plug and unplug JProfiler to/from my application, plus there are predefined resource monitoring options with description of its impact on performance of the application which is going to be profiled.
Unfortunately I cannot state how good it is in comparison to other existing tools, rather just pointing out the experience I had with this tool.
Upvotes: 1
Reputation: 26703
Profiler ...probably not. But you can try using BTrace.
In my experience, BTrace overhead is far less noticeable than any profiler (depending on activity, of course - e.g. if you want to trace execution of all methods, this will be expensive no matter what).
On top of that, BTracing does not require any special JVM startup parameters. And yes, you can plug/unplug it whenever you need.
Upvotes: 0