bodhi/tools/metrics.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
New commits: commit 98847c7dfd6a5cd3cb5d94d2bc26ce9da2e82cb5 Merge: 565cb9d... f097b38... Author: Luke Macken lmacken@redhat.com Date: Wed May 19 08:31:50 2010 -0400
Merge branch 'master' of git+ssh://git.fedorahosted.org/git/bodhi
commit 565cb9dabc860cb3f18758ce36ab0fc6ee5ca8b7 Author: Luke Macken lmacken@redhat.com Date: Wed May 19 08:31:36 2010 -0400
Fix a bug in the metrics script
diff --git a/bodhi/tools/metrics.py b/bodhi/tools/metrics.py index aa8e6dd..dfc5c39 100755 --- a/bodhi/tools/metrics.py +++ b/bodhi/tools/metrics.py @@ -29,8 +29,8 @@ def main(): updates = PackageUpdate.select(PackageUpdate.q.releaseID==release.id) stats[release.name] = { 'num_updates': updates.count(), - 'num_testing': 0, - 'num_testing_without_karma': 0, + 'num_tested': 0, + 'num_tested_without_karma': 0, 'num_feedback': 0, 'num_anon_feedback': 0, 'num_critpath': 0, @@ -97,9 +97,9 @@ def main(): if not feedback_done: data['critpath_without_karma'].add(update) if testingtime_done: - data['num_testing'] += 1 + data['num_tested'] += 1 if not feedback_done: - data['num_testing_without_karma'] += 1 + data['num_tested_without_karma'] += 1
data['deltas'].sort()
@@ -120,12 +120,12 @@ def main(): data['num_anon_feedback'], float(data['num_anon_feedback']) / (data['num_anon_feedback'] + sum(data['karma'].values())) * 100) print " * %d out of %d updates went through testing (%0.2f%%)" % ( - data['num_testing'], data['num_updates'], - float(data['num_testing']) / data['num_updates'] * 100) + data['num_tested'], data['num_updates'], + float(data['num_tested']) / data['num_updates'] * 100) print " * %d testing updates were pushed *without* karma (%0.2f%%)" %( - data['num_testing_without_karma'], - float(data['num_testing_without_karma']) / - data['num_testing'] * 100) + data['num_tested_without_karma'], + float(data['num_tested_without_karma']) / + data['num_tested'] * 100) print " * %d critical path updates pushed *without* karma" % ( len(data['critpath_without_karma'])) for update in data['critpath_without_karma']: