Pages

Wednesday, March 13, 2013

So how well are we doing lately?

Git v1.8.2 has 630+ non-merge commits since v1.8.1 release.

Averaged over time, the impact of each individual commit is about the same (because we reject an oversized patch that does too many unrelated things and have the submitter split it into multiple patches), so if one release cycle has twice the non-merge commits compared to another cycle, we can say it was about twice as busy.

But from time to time, it is good to measure our progress with different metrics to see how different metrics correlate with each other.

The table at the end lists how long each release cycle lasted, how many non-merge commits we had in the cycle and in each day in the cycle and how many lines of code (counting only *.[ch] source files) were affected in the cycle and in each day in the cycle. The "lines of code affected" are counted in two different ways.

We can see that the latest release cycle was relatively active, while the previous cycle that overlapped the year-end holidays was slow, both from commit count (348 vs 635) and one modification count (2921 vs 5881), but not with the other modification count (6047 vs 6355).

The "modified" number is computed with "git blame -C -C -C -w" to track line-level movements, while the "modified2" number is computed with "git diff -M" which is less accurate when the code gets refactored, and that is where the above apparent discrepancy comes from.

The v1.8.1 cycle has a lot smaller real changes (measured by "git blame") than apparent changes (measured by "git diff -M") because it created two new files by splitting two existing files.  The measurement based on "git blame -C" knows to consider bulk movement of lines by such a change as a non-event, but it will show up in "git diff --stat -M" output as a large change.

 builtin/fetch-pack.c | 950 +-------------------------------------------------------------
 builtin/send-pack.c  | 333 ----------------------
 fetch-pack.c         | 951 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 send-pack.c          | 344 +++++++++++++++++++++++

So the "modified" number is a better indication of how much actual work is done, but it is painfully expensive to compute.

I'll later explain how to use blame and diff to compute these numbers for your projects in a separate post.

releasedayscommitscommit/daymodifiedmod/day modified2mod2/day
v1.5.090144816.0812369137.4313640151.55
v1.5.14964313.127822159.638213167.61
v1.5.24657512.507604165.308273179.84
v1.5.3104132212.71808177.70953891.71
v1.5.4152159510.4921422140.9324934164.03
v1.5.56672911.049790148.3312172184.42
v1.5.6715698.01709199.878354117.66
v1.6.05973112.3816709283.2019481330.18
v1.6.112910338.001031679.9614262110.55
v1.6.2694997.23483570.07532277.13
v1.6.36369210.986642105.428687137.88
v1.6.4835006.0213571163.5014296172.24
v1.6.5724125.72501869.69562378.09
v1.6.6744836.52601181.22673090.94
v1.7.05156911.157698150.948635169.31
v1.7.1704776.81583083.28655893.68
v1.7.2885326.04561563.80638072.50
v1.7.3594818.1520753351.7421473363.94
v1.7.41347465.56852763.63974472.71
v1.7.5835486.60676681.51754390.87
v1.7.6634276.77396262.88435169.06
v1.7.7965635.86892893.0010107105.28
v1.7.8624266.87509882.22546388.11
v1.7.9563916.986338113.176886122.96
v1.7.10694406.37505173.207271105.37
v1.7.11726529.057354102.138863123.09
v1.7.12633826.06306048.57341154.14
v1.8.0624978.01561190.50603797.37
v1.8.1713484.90292141.14604785.16
v1.8.2716358.94588182.83659992.94