diff --git a/clang/utils/analyzer/CmpRuns.py b/clang/utils/analyzer/CmpRuns.py index 17d50ab65930..1b8fe7bd698d 100755 --- a/clang/utils/analyzer/CmpRuns.py +++ b/clang/utils/analyzer/CmpRuns.py @@ -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