Report: data 56/9156/1
authorTibor Frank <tifrank@cisco.com>
Tue, 31 Oct 2017 15:25:02 +0000 (16:25 +0100)
committerTibor Frank <tifrank@cisco.com>
Tue, 31 Oct 2017 15:25:02 +0000 (16:25 +0100)
Change-Id: I55b715aefd4d9d2e95010a445e6cef880875d0f1
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/tools/presentation/generator_tables.py
resources/tools/presentation/utils.py

index af5fcd1..e66047f 100644 (file)
@@ -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":
index f9feeb0..cf3005c 100644 (file)
@@ -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):

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.