aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-07-25 07:30:29 +0200
committerTibor Frank <tifrank@cisco.com>2017-07-25 07:30:29 +0200
commitdbc81d911fb43d76b255d11fd0dbfebff38bd261 (patch)
tree60283a22f18fdd34f5996f7ac8fd651d2ed93ee6
parent7ab64cd86a58dd5f2039fd0cf79cd4045c1b2789 (diff)
Display "change" in format "xx.x%"
Change-Id: I79e9abc28926759e3c4ce775ab2afa9fed79a377 Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rwxr-xr-xresources/tools/report_gen/run_improvments_tables.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/tools/report_gen/run_improvments_tables.py b/resources/tools/report_gen/run_improvments_tables.py
index 7bd6775a87..0432644d8c 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 "{:.0f}%".format(item["change"])
+ change = "" if item["change"] is None else "{:.1f}%".format(item["change"])
file_handler.write("{},{},{},{}\n".format(item["old"], mean, stdev, change))
@@ -172,7 +172,7 @@ def main():
for item in csv_data:
mean, stdev = calculate_stats(item["rates"])
if mean is not None:
- mean = mean / 1000000
+ mean = float(mean) / 1000000
old = float(item["last_old"])
item["mean"] = mean
item["change"] = ((mean - old) / old) * 100