views:

106

answers:

4

Hi,

I have to do profiling of the Java application. I would appreciate if anyone let me know the free Java pr-filer. I heard about YourKit but don't know much about performance of it. Alos like the information on Java code optimization. Thanks in advance.

Thanks

+4  A: 

I recommend JVisualVM. It's shipped as part of the JDK. You can find it in the bin folder, or you can download it here.

You can use it to monitor in which methods your app spends it time, but you can also look at threads and memory usage. It can also create heap dumps, which you can then analyze with VisualVM itself, or with the excellent (and also free) Memory Analyzer (MAT).

jqno
You can run VisualVM by running the command `jvisualvm`.
Jesper
+1  A: 

I recommend Eclipse TPTP (Test & Performance Tools Platform). It offers a feature-rich profiler and is free. It's part of the Helios release, you can download it using the Helios update site.

The Tracing and Profiling Tools Project is a project in the Eclipse TPTP Top-Level Project, it addresses the tracing and profiling phases of the application lifecycle. The Tracing and Profiling Tools Project provides frameworks for building tracing and profiling tools by extending the TPTP Platform. The framework contains views, dialogs and action items that support the capability of collecting and analyzing application performance information. The project includes exemplary profiling tools for both single-system and distributed Java applications through monitoring agents that collects trace and profile data. A generic tool kit for customizable probe insertion is also available.

Sylar
A: 

You can use jvisualvm which is bundled starting from JDK 6 update 7. If you don't want to install another JDK on your machine, you can download visualvm. But by all means, if you have the budget, I'd recommend getting YourKit as it provides more sophisticated features and better metrics that visualvm don't have.

jpartogi
A: 

Thanks for your informations.

Saurabh01