Fix a (possible) division by zero check in the CmpRuns script

I missed updating the check in r333375

llvm-svn: 333529
This commit is contained in:
Mikhail R. Gadelha 2018-05-30 11:17:55 +00:00
parent 7626759702
commit 690a99a5fb
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,7 @@ def compareStats(resultsA, resultsB):
report = "%.3f -> %.3f" % (valA, valB)
# Only apply highlighting when writing to TTY and it's not Windows
if sys.stdout.isatty() and os.name != 'nt':
if valA != 0:
if valB != 0:
ratio = (valB - valA) / valB
if ratio < -0.2:
report = Colors.GREEN + report + Colors.CLEAR