[Teammetrics-discuss] Git Statistics

Andreas Tille andreas at an3as.eu
Mon Jun 27 13:13:39 UTC 2011


On Mon, Jun 27, 2011 at 05:42:48PM +0530, Sukhbir Singh wrote:
> Along with the deb package, I have started work on parsing Git repositories.
> 
> Here are some points that are up for discussion:
> 
> 1. The configuration for the repositories is stored in
> /etc/teammetrics. An example:
> 
>     [project-name]
>     url = <url-to-git-repository>
> 
> I don't think there is anything more to add here, but you can suggest.

I have heard rumors about a tool mr (try `apt-cache show mr`) which
*perhaps* might simplify mentioning all these different Git repositories
which might belong to the very same team.  The problem we have with Git
is that it would be necessary to touch configuration of the teammetrics
if *any* new package gets added by a team member.  That's not relieable
- or rather it is determined that it will fail to be maintained.  So any
method which can obtain all Git repositories of one team (perhaps also
by querying UDD for Vcs-Git or something like this) is welcome.

In the case of SVN this turns out as a simple task because there is a
constant number of SVNs per team (mostly only one).
 
> 2. There is no way to get the logs without cloning the repository.

Here I perfectly trust your Git knowledge.

> Now comes the important part. Remember I said that we should include
> the lines committed as a metric? Here is what I propose: for each
> given author, let us get the total number of insertions and total
> number of deletions. The difference of those will be used as a metric.
> So if someone is adding lines and deleting very few of them, this
> means he is contributing more, right? There is only one problem with
> this approach -- sometimes when making edits, we delete more than we
> add. Should we bother about this then? If we do, we can't have a
> definite metric, then we need to have the metric of insertion and
> deletions as distinct metrics. Let's decide this.

That's a non-trivial question.  In any case I would record the plain
number of commits.  Regarding the lines of code:  Perhaps it makes sense
to just record both numbers additions *and* deletions.  Later you are
able to play with the metrics and see what might make sense.
 
> 3. After we have the data, we push that into a table called gitstat.
> And then it's done.

Yes. :-)

Kind regards

       Andreas.

-- 
http://fam-tille.de



More information about the Teammetrics-discuss mailing list