aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-10-31 16:25:02 +0100
committerTibor Frank <tifrank@cisco.com>2017-10-31 15:25:46 +0000
commite3b908b1fd9a582757bf3cf5c9ee1913870c5d03 (patch)
treec7709f9c12f45e2b6d32d6a1d68de275e33494e0
parent44d6329c114f9f572b74e0a12543f37dc27aa4c9 (diff)
Report: data
Change-Id: I55b715aefd4d9d2e95010a445e6cef880875d0f1 Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit 45790e85151194fdea40530a31d5181bb4b21e85)
-rw-r--r--resources/tools/presentation/generator_tables.py5
-rw-r--r--resources/tools/presentation/utils.py2
2 files changed, 4 insertions, 3 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index af5fcd1f57..e66047f9bc 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -183,12 +183,13 @@ def table_performance_improvements(table, input_data):
for build in data[job]:
try:
data_lst.append(float(build[tmpl_item[0]]["throughput"]
- ["value"]) / 1000000)
+ ["value"]))
except (KeyError, TypeError):
# No data, ignore
continue
if data_lst:
- tbl_item.append({"data": eval(operation)(data_lst)})
+ tbl_item.append({"data": (eval(operation)(data_lst)) /
+ 1000000})
else:
tbl_item.append({"data": None})
elif cmd == "operation":
diff --git a/resources/tools/presentation/utils.py b/resources/tools/presentation/utils.py
index f9feeb0411..cf3005c0b4 100644
--- a/resources/tools/presentation/utils.py
+++ b/resources/tools/presentation/utils.py
@@ -57,7 +57,7 @@ def relative_change(nr1, nr2):
:rtype: float
"""
- return float((nr2 - nr1) / nr1 * 100)
+ return float(((nr2 - nr1) / nr1) * 100)
def get_files(path, extension=None, full_path=True):