Commit 88617fe4 by Martin Liska Committed by Martin Liska

Do not divide by zero in analyze_brprob.py

	* analyze_brprob.py: If there's no loop, do not calculate
	average number of loop iterations.

From-SVN: r238590
parent 01771d43
2016-07-21 Martin Liska <mliska@suse.cz>
* analyze_brprob.py: If there's no loop, do not calculate
average number of loop iterations.
2016-06-24 Martin Liska <mliska@suse.cz>
* analyze_brprob.py: Parse and display average number
......
......@@ -149,6 +149,7 @@ class Profile:
percentage(v.hits, v.count), percentage(v.fits, v.count),
v.count, v.count_formatted(), percentage(v.count, self.count_max()) ))
if len(self.niter_vector) > 0:
print ('\nLoop count: %d' % len(self.niter_vector)),
print(' avg. # of iter: %.2f' % average(self.niter_vector))
print(' median # of iter: %.2f' % median(self.niter_vector))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment