I am looking for the Java equivalent of gprof. I did a little Java profiling using System.getCurrentMillis(), and saw several GUI tools which seem too much. A good compromise could be a text-based Java profiler, preferably free or low-cost, which works in either Windows XP or Linux.
JProbe from Quest Software will rock your world ;)
But it has a price... You can use the trial for 10 days though ;)
edit: I see that they also have a freeware version with only the Memory Heap Dump Analysis... Quite nice!
You may want to check out the following:
- VisualVM - JMX monitor with profiling tools from NetBeans
- YourKit
- SAP Memory Analyzer
- jmap and jhat included with JDK
We've been using JProfiler where I work and are very pleased.
Absolutely no need to go non-free, also the text based profiling tools that exist are nowhere near as easy to use as the GUI ones. Specifically for profiling having flexible views that you can easily resort, filter, slice and dice is a huge plus.
My recommendation: go with Netbeans and its included profiler or the above mentioned VisualVM if you have access to JDK 1.6 update 7 or higher (they are basically the same product).
You may checkout JAmon http://jamonapi.sourceforge.net/). It's quite easy and gives very good facility to monitor a part of code or entire function flow.
It uses Proxy mechanism and at any point of time you can generate the report of performance by calling just one method.
It does not have any fancy GUI but if you are developer and you want to develop your own custom solution to monitor the things, I guess this one would do the job.
YourKit does a GREAT job at profiling Java applications. It is a commercial project, but it does have demo licenses available (30 days if I remember correctly).
JProfiler works well - easy to setup in eclipse, and pretty much no configuration. Just pretty the button to launch it in the profiler instead of the normal test/run config.
JXInsight has been labeled the "gold standard" in Java application performance management. It can be used in development, test and production which cannot be said for other tools. Its Probes technology out performs all other profilers by 20x-100x in SPECjvm2008 benchmarks. It has more than 4000+ system properties to tweak the runtime overhead and data collection and ships with 600+ technology specific extensions.
I know Netbean is a GUI tool, but it has a great profiler, easy to use, I use it daily.
I searched for this myself, and found that the free VisualVM is very good. Be sure to download the most recent version. (An older version also comes with the Java JDK).
There is a Eclipse plugin available, but it doesn't offer much. The profiler doesn't wait with starting your program until it's ready to profile, so you have to manually set some sleep timer or so.