aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-07-25 11:10:42 +0200
committerTibor Frank <tifrank@cisco.com>2017-07-25 09:12:10 +0000
commitd53db6743ed8c09b88ec6ad147085148d579a357 (patch)
tree9b890dfc81c5305586f8fcccf8ad93f25cd9ac49 /resources/tools
parent9238479a421b7fd0e2a3b424dcc584f86f73501a (diff)
Report: Use rounded values
Change-Id: I218ea0900ec6f5d3e513f5dfc15f6f4f3db16a66 Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit a0ff7c5d45f49e06d72071ad926274fd4c0bb061)
Diffstat (limited to 'resources/tools')
-rwxr-xr-xresources/tools/report_gen/run_improvments_tables.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/resources/tools/report_gen/run_improvments_tables.py b/resources/tools/report_gen/run_improvments_tables.py
index 0432644d8c..6b4953c00b 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))
@@ -175,7 +175,8 @@ def main():
mean = float(mean) / 1000000
old = float(item["last_old"])
item["mean"] = mean
- item["change"] = ((mean - old) / old) * 100
+ item["change"] = ((round(mean, 1) - round(old, 1)) / round(old, 1))\
+ * 100
item["stdev"] = stdev / 1000000
# Sort the list, key = change