do not be rediculous about precision

our data really doesn't need all the decimal points that a float
offers, turn it into a human readable thing.

Change-Id: Ic7a204f2446dc0df6650c5fc4a3d744db8ef602a
This commit is contained in:
Sean Dague 2014-01-23 20:53:22 -05:00
parent 5e2dda27e1
commit a2adaf8e47
1 changed files with 3 additions and 2 deletions

View File

@ -125,12 +125,13 @@ def classifying_rate(fails, data, engine):
url['timestamp'])
classifying_rate = collections.defaultdict(int)
classifying_rate['overall'] = ((float(count) / float(total)) * 100.0)
classifying_rate['overall'] = "%.1f" % (
(float(count) / float(total)) * 100.0)
for job in bad_jobs:
if bad_jobs[job] == 0 and total_job_failures[job] == 0:
classifying_rate[job] = 0
else:
classifying_rate[job] = (
classifying_rate[job] = "%.1f" % (
100.0 -
(float(bad_jobs[job]) / float(total_job_failures[job]))
* 100.0)