Tweak disagreement ratio calcuation

Divide by the number of +1/+2 votes, not the total number of votes.

Change-Id: Ia77a7a711c7969fcc45679589a8ba2763cd8c119
This commit is contained in:
Russell Bryant 2013-08-12 10:04:58 -04:00
parent 428887a732
commit 556375daed
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ def main(argv=None):
r = '%d (%d|%d|%d|%d) (%.1f%%)' % (k['total'],
k['votes']['-2'], k['votes']['-1'],
k['votes']['1'], k['votes']['2'], ratio)
dratio = (float(k['disagreements']) / float(k['total'])) * 100
dratio = ((float(k['disagreements']) / plus) * 100) if plus else 0.0
d = '%d (%.1f%%)' % (k['disagreements'], dratio)
table.add_row((name, r, d))
total += k['total']