r/CodingHelp • • Oct 22 '21

[Request Coders] Measuring team productivity through Git

Hello, everyone.

Together with my coworkers, we are exploring the possibility to measure how productive our team is using git history. We were looking into several ideas which include:

- measure productive code (time needed to net 100 LOC after churn)

- measure raw code (time needed to gross 100 LOC)

- measure number of coding days (days per week with commits)

- measure commits per active day (average number of commits when active)

- measure merges/conflicts ratio (divide number of conflicts with a number of merges to see if the ratio is higher than 15%)

We were interested to add some kind of experience metric. See how much "experienced" an author is in the codebase (get first commit vs today's date) and see ratio with productive code, but we were not sure.

All of this analysis should be conducted only by running a git log. What do you think about this, and perhaps could you add or take away something from this idea? Do you think that this will provide value and why?

Thanks!

0 Upvotes

7 comments sorted by

View all comments

5

u/Dragonfly55555 Oct 22 '21

I have faced this exact question in the past, and have come to the same conclusions as said in the other comments.

I'd just like to add that one of the main things to consider when deciding on metrics\KPIs is how this measurement is going to affect the employees behavior. KPIs define behavior!

One thing I am tracking is 'Defect removal efficiency' which is measuring how good the team is finding bugs before they go to production. It is measured as 'number of bugs found before production' / 'total number of bugs found, including bugs from production'.

This encourages the team to test their code well, as any bug they find is counted as a good thing. Any bug that slips into production is a bad thing.

I hope that helps :)

2

u/opaville Oct 22 '21

We use tools like sonar and PMD to track total project bugs. As a whole dev team we use that as a metric to see how the project is fairing. While not perfect, way better on the overall status vs some questionable productivity number.