views:

194

answers:

4

I am looking for some interesting dynamic analysers to use and report on for a university assignment. The tools should be:

  • Open-source (so I can learn from them)
  • Free (both as in speech and beer, because I want to be able to share the results, and I'm tight-fisted, respectively)
  • Intended for Java (source or bytecode)

This includes, but is not limited to, performance profilers. They can perform any kind of analysis, as long as it's dynamic, for example, code coverage, multi-threaded correctness.

The results generated should be useful in some way, but they do not have to be industrial strength.

Similar question:

So what are some interesting, free, open-source Dynamic Analysis tools for Java?

+1  A: 

Cobertura and Emma will perform code coverage analysis.

In terms of multi-threaded correctness, FindBugs will do some of this. However it performs static analysis. i.e. not whilst the program is running.

Brian Agnew
A: 

I've found Yourkit to be a pretty amazing profiler for java. It does wonderful hotspot analysis and memory profiling. I've used it to find many a memory leak as well as lots of optimizations.

It also has a nice Eclipse integration plugin (if that's your bag)

Benj
Yourkit is not free, or open source. Though it does have an evaluation period.
Grundlefleck
Is Yourkit open source?
Pascal Thivent
Ahh, didn't spot that bit of the question. It is a great tool though, well worth considering anyway.
Benj
+2  A: 

Check out Glassbox, a troubleshooting agent for Java applications that automatically diagnoses common problems. Glassbox deploys as a war file to your appserver and then uses AspectJ load time weaving to monitor application components and other artifacts, in order to identify problems like excess or failed remote calls, slow queries, too many database queries, thread contention, even what request parameters caused failures.

Glassbox monitors applications non-invasively by using aspects to track component interactions. We also monitor built-in JMX data, notably on a Java 5 VM we sample thread data (every 100 ms by default). As a request is processed, we summarize noteworthy events such as where time was spent and what parameters were involved in making things slow or fail. We also detect higher-level operations (such as Struts actions or Spring controllers) that we use to report on. Our AJAX Web client then provides summaries of status by operation on the machines being monitored and we generate a more detailed analysis on request. Glassbox allows monitoring clusters of servers: the Web app uses JMX Remote or direct RMI to access data from remote servers. We also provide JMX remote access to the lower-level summary statistics.

Pascal Thivent
+1 For an interesting looking tool. Do you happen to know if it's constrained to web applications?
Grundlefleck
Glassbox is a WAR so it must be deployed in an appserver but it can monitor resources such as JMS and EJB. So, no, it's not constrained to web applications.
Pascal Thivent
Excuse what is probably a silly question, can it analyse any given Java program, like a Swing app? It boasts lots of functionality, but I can't tell the site chooses not to mention basic stuff, or if it's not capable.
Grundlefleck
No, it can only analyze things that run inside a container i.e. server-side apps.
Pascal Thivent
A: 

One I've used before is a performance profiler named JRat.

Runs as a Java agent and reports statistics like time spent within a certain method.

Grundlefleck