fix classification rate
the old classification rate is clearly wrong, though why the total calculation is wrong is beyond me right now. Fix this to be sane. Can't wait to retire all this code for something that's not a bunch of iteration loops. Change-Id: Ibafc1fa396ae21115931b051ba3f27cb44dffea3
This commit is contained in:
parent
c5ebf365a1
commit
236a050be9
@ -73,7 +73,7 @@ def all_fails(classifier):
|
||||
all_fails["%s.%s" % (build, name)] = {
|
||||
'log': log,
|
||||
'timestamp': timestamp
|
||||
}
|
||||
}
|
||||
return all_fails
|
||||
|
||||
|
||||
@ -100,12 +100,13 @@ def classifying_rate(fails, data, engine):
|
||||
for job in bug['failed_jobs']:
|
||||
found_fails[job] = True
|
||||
|
||||
total = len(found_fails.keys())
|
||||
bad_jobs = collections.defaultdict(int)
|
||||
total_job_failures = collections.defaultdict(int)
|
||||
bad_job_urls = collections.defaultdict(list)
|
||||
count = 0
|
||||
total = 0
|
||||
for f in fails:
|
||||
total += 1
|
||||
build, job = f.split('.', 1)
|
||||
total_job_failures[job] += 1
|
||||
if found_fails[f] is True:
|
||||
@ -142,6 +143,9 @@ def classifying_rate(fails, data, engine):
|
||||
|
||||
tvars = {
|
||||
"rate": classifying_rate,
|
||||
"count": count,
|
||||
"total": total,
|
||||
"uncounted": total - count,
|
||||
"jobs": sort,
|
||||
"total_job_failures": total_job_failures,
|
||||
"urls": bad_job_urls
|
||||
|
@ -17,8 +17,9 @@
|
||||
<div class="jobs">
|
||||
<h1>Unclassified failed jobs</h1>
|
||||
Overall Categorization Rate: {{ rate['overall'] }}%
|
||||
|
||||
|
||||
<p>
|
||||
Total: {{ total }} - Found: {{ count }} = Unclassifed: {{ uncounted }}
|
||||
</p>
|
||||
{% for job in jobs %}
|
||||
<a name="{{job[0]}}"></a>
|
||||
<a href="#top"><i>back to top</i></a>
|
||||
|
Loading…
Reference in New Issue
Block a user