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=0432644d8ccc1ceb4b6fbd8975acfb1d3b9f934c;hb=c7eb2002bcd007520309feb3e11a26ff847a4e05;hpb=dbc81d911fb43d76b255d11fd0dbfebff38bd261 diff --git a/resources/tools/report_gen/run_improvments_tables.py b/resources/tools/report_gen/run_improvments_tables.py index 0432644d8c..ebdfd60f14 100755 --- a/resources/tools/report_gen/run_improvments_tables.py +++ b/resources/tools/report_gen/run_improvments_tables.py @@ -116,7 +116,7 @@ def write_line_to_file(file_handler, item): mean = "" if item["mean"] is None else "{:.1f}".format(item["mean"]) stdev = "" if item["stdev"] is None else "{:.1f}".format(item["stdev"]) - change = "" if item["change"] is None else "{:.1f}%".format(item["change"]) + change = "" if item["change"] is None else "{:.0f}%".format(item["change"]) file_handler.write("{},{},{},{}\n".format(item["old"], mean, stdev, change)) @@ -173,9 +173,10 @@ def main(): mean, stdev = calculate_stats(item["rates"]) if mean is not None: mean = float(mean) / 1000000 - old = float(item["last_old"]) + 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