views:

181

answers:

3

Is there some tool to monitor different metrics for a Java project over a longer period of time, preferrably by the data in CVS to establish trends and weak points? This would be a good starting point for continuous code reviews and for maintaining code quality.

I'm especially interested in number of references, size of classes and methods and cyclomatic complexity.

+3  A: 

I have had some good experiences with Cobertura (free) and Clover (not free).

I know they are both primarily coverage tools but if I remember correctly they both have cyclomatic complexity and other useful stuff.

Edit: Found a nice list of open source tools for these purposes:

http://java-source.net/open-source/code-coverage

NickDK
+3  A: 

Sonar is a good "aggregate of metrics" tool.

See Time Machine for how to get metrics about past builds/releases into Sonar.

matt b
Sonar is good but it assumes that you use Maven
kazanaki
@kazanaki You can use Maven just for the metrics, you don't have to use it for your build.
KLE
http://sonar.codehaus.org/sonar-light-the-low-calorie-mode-for-sonar/ instructions on how to upload metrics to Sonar for non-maven projects
matt b
+1  A: 

Clover allows you to chart any of its 30 metrics across time and supports both Ant and Maven2. You can even define your own metrics by combining existing ones using Clover's Expression Language.

Each of the metrics can be displayed inline in the source level reports, or on the historical report both in chart format, or in the Movers showing section that highlights deltas in the metrics across a specific time-span.

More information is available in the online documentation: http://confluence.atlassian.com/display/CLOVER/%27Historical%27+Report

npellow