6

Does any simple tool exist, that can calculate various metrics from version control? Most metrics calculators work only on source code. I'm using SVN. Some nice graphics output like graphs or histograms would be good too.

Metrics like:

  • How often each file is changed
  • How many files or LoC were changed in commits (average, median, histogram)
  • What files are often changed together
  • How many LoC are changed for each file (average, median, histogram)
  • It's not for SVN (as you asked), but there's a python-based solution called git-churn, which could be a start for what you want. Python is easy to modify, so you could possibly do the analogous SVN operations and add the visualizations with some other tool. – Fuhrmanator Sep 27 '17 at 18:47
2

I don't know that you'll find a tool that handles all of your requirements, but, the one I can recommend is StatSvn. We use it as part of our nightly Jenkins build process. It identifies LOC and churn for us.

2

In the book Your code as a crime scene (Amazon Germany), Adam Tornhill uses version control systems to find a lot of interesting facts and presents them in a "new" way. The cool thing is that the generated graphics are interactive. You can also find videos by Adam Tornhill on Youtube, but be warned that they appear a bit staged (they focus a bit too much on the "crime scene" for my taste).

He published his code under the title Code Maat on Github.

  • it is gratis / free / open source
  • it supports SVN , GIT, P4, Mercurial and TFS

The metrics he uses are

  • Change Frequency (age of the code), see MetricsTreeMap
  • Code Churns (additions and deletions)
  • Ownership patterns (which developer is important for a class and might be the single point of failure, e.g. if he leaves the company)

Code Maat alone is probably not a perfect answer, since he does not care about LoC metrics much. Therefore combine it with other tools like StatSVN to get most out of the data.

  • 1
    One downside: I did not find binaries for download, so it seems you have to build it yourself. – Thomas Weller Jun 2 '16 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.