views:

2867

answers:

7

I'm looking for any tools that can give you code churn metrics (graphs and charts would be even better) for a Subversion repository.

One tool I know of is statsvn - a Java tool that creates some HTML reports and some code churn metrics. Statsvn reports the number of lines modified (churned) by user over time, some descriptive stats on LOC per file and folder/subfolder, etc.

I would like to know code churn in order to get a better idea of the state of the project. Idea behind this inspired by the MS research: Use of Relative Code Churn Measures to Predict System Defect Density

In a nutshell, the more that source code is churning (changing, whether adding new lines, deleting, changing,etc) the higher the probability that defects are being introduced into the system. The MS research paper says that the number of defects produced can be predicted based on a number of relative code churn measures.

I wanted to know if there are any others that are maybe open source, extensible, etc.

+3  A: 

I'm curious; what does the LOC/Churn report tell you?

What are you hoping to accomplish with churn metrics?

Peter Ritchie
A: 

The only one i've ever heard of and used is statsvn, searching google doesnt return many results.

John Boker
+1  A: 

If you are willing to go the commercial route check out FishEye from Atlassian (also see their demo site ). FishEye also supports adding plugins (though this does not appear to be very well supported at this time).

John Meagher
A: 

You can probably use svn blame to get the date each line was changed and then use sed to pull out only the year and month and then use sort and uniq -c to generate a useful report.

James A. N. Stauffer
+3  A: 

I have written a tool called 'svnplot' (which I admit was inspired by the output of StatSVN). Its written in python and available on Google code. http://code.google.com/p/svnplot. You can see the sample output at http://thinkingcraftsman.in/projects/svnplot/index.htm

The details/output are not as elaborate as 'fisheye'. Basically it converts the Subversion log history into a 'sqlite' database and then queries sqlite database to generate graphs. You can write your own queries using the created sqlite database.

See if it works for you.

Nitin Bhide
A: 

The Power Software tool, KEPM, is pretty focused on CHURN these days. JP

A: 

try programeter.com which analyses Subversion and many other dev. tools.

Mark Kofman