Commit f69ed477 authored by Marek Olšák's avatar Marek Olšák

si-report.py: report % change correctly for 0->N

not all places are fixed
Acked-by: default avatarNicolai Hähnle <nicolai.haehnle@amd.com>
parent f826074b
......@@ -39,7 +39,7 @@ def get_str(value, suffix = ' %'):
def calculate_percent_change(b, a):
if b == 0:
return 0
return 0 if a == 0 else float("inf")
return 100 * float(a - b) / float(b)
def cmp_max_unit(current, comp):
......
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