I just had a look at statistics of repository of one of the projects I’m working on. I’m one of the three developers working on it right now and it’s been five months since we started. I saw that number of commits is degrading, we check in less often. One can jump into conclusions that work dramatically slowed down during past two months. We don’t reach even half of the number of commits we used to. It wonders me now, can I believe this statistics. Is it the summer time? Are we just tired after five moths of heavy coding. Or perhaps we just stopped committing like crazy, perhaps we became more mature commiters, we now do less commits and check in more files per commit, making sure everything works locally for us before we submit our code to tests.
Even before I started to think how to analyse my repository data, google had the answer. I came across this neat project called StatSVN. This little java program will generate all the fancy statistic you might need out of your svn repo log file.
All you need to do to get started is to download it, export svn log for your project and feed it to statsvn. It will generate nice report in html with nice looking and all-telling graphs. I tested that on my repo with this steps:
1. Navigate to project directory
> cd d:\projects\myproject
2. Export svn log in xml format (make sure you have svn command line client installed and and available in your PATH – StatSVN will needs that later on too)
> svn log -v --xml >mylogfile.log
3. Now, create directory for your report files
> mkdir d:\misc\statsvn\myproject
> cd Â d:\misc\statsvn\myproject
4. From within created directory run statsvn.jar with two arguments a)path to log file generated and b)path your project directory
>java -jar d:\tools\statsvn\statsvn.jar d:\projects\myproject\mylogfile.log d:\projects\myproject
StatSVN will do the rest.
Now, I will sit down and look at graphs and try to understand what is happening with my project.
Here’s bunch of links to get you started:
Sample report generated out of StatSVN repo