diff options
author | Jonathan Corbet <corbet@lwn.net> | 2015-03-26 13:33:57 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2015-03-26 13:33:57 -0600 |
commit | 5516be6e392b210a32d95f61cda0f50a8bcf5be4 (patch) | |
tree | 804dfab69fa888c9afa1ccc5fde184e00735cb9e /reports.py | |
parent | 5e7f0d50fb869b0af4e3f2c9c7b3ebf04ebe4adb (diff) |
Make "lines changed" accounting consistent
We were calculating "total lines changed" on a per-patch basis, while a
developer's lines changed were max(added,removed) for the entire period
under study. Track developer changed lines per-patch as well...this has
the nice effect of making the percentages add up to 100...
Diffstat (limited to 'reports.py')
-rw-r--r-- | reports.py | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -106,7 +106,7 @@ def ReportByPCount(hlist, cscount): EndReport() def CompareLChanged(h1, h2): - return max(h2.added, h2.removed) - max(h1.added, h1.removed) + return h2.changed - h1.changed def ReportByLChanged(hlist, totalchanged): hlist.sort(CompareLChanged) @@ -114,10 +114,8 @@ def ReportByLChanged(hlist, totalchanged): BeginReport('Developers with the most changed lines') for h in hlist: pcount = len(h.patches) - changed = max(h.added, h.removed) - delta = h.added - h.removed - if (h.added + h.removed) > 0: - ReportLine(h.name, changed, (changed*100.0)/totalchanged) + if h.changed > 0: + ReportLine(h.name, h.changed, (h.changed*100.0)/totalchanged) count += 1 if count >= ListCount: break |