X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Freport_gen%2Frun_improvments_tables.py;h=ebdfd60f142c40e98dac6da6cdb89d0dcb87e7e2;hp=7bd6775a8786e0df270e3f79bc8c65953100d012;hb=fd6fedc983a7d1796eb2531782be8a37b6d0921d;hpb=1911067935bdf6481fc9b89f40d79ca61f2448d0 diff --git a/resources/tools/report_gen/run_improvments_tables.py b/resources/tools/report_gen/run_improvments_tables.py index 7bd6775a87..ebdfd60f14 100755 --- a/resources/tools/report_gen/run_improvments_tables.py +++ b/resources/tools/report_gen/run_improvments_tables.py @@ -172,10 +172,11 @@ def main(): for item in csv_data: mean, stdev = calculate_stats(item["rates"]) if mean is not None: - mean = mean / 1000000 - old = float(item["last_old"]) + mean = float(mean) / 1000000 + old = float(item["last_old"]) if item["last_old"] else None item["mean"] = mean - item["change"] = ((mean - old) / old) * 100 + item["change"] = ((round(mean, 1) - round(old, 1)) / round(old, 1))\ + * 100 if old else None item["stdev"] = stdev / 1000000 # Sort the list, key = change