PAL: list all sel tests in table_performance_comparison 86/21686/1
authorTibor Frank <tifrank@cisco.com>
Mon, 2 Sep 2019 16:48:37 +0000 (18:48 +0200)
committerTibor Frank <tifrank@cisco.com>
Mon, 2 Sep 2019 16:50:57 +0000 (16:50 +0000)
Change-Id: I99ccbca3e56a58a662c569d195ecdef20d3ea348
Signed-off-by: Tibor Frank <tifrank@cisco.com>
(cherry picked from commit ff3201774cf904bad6c64adf11f1fae92d5f8588)

resources/tools/presentation/generator_tables.py

index 9ba16b8..ffb4f1a 100644 (file)
@@ -296,6 +296,20 @@ def table_performance_comparison(table, input_data):
                     replace("4t4c", "4c").replace("8t4c", "4c")
                 if "across topologies" in table["title"].lower():
                     tst_name_mod = tst_name_mod.replace("2n1l-", "")
+                if tbl_dict.get(tst_name_mod, None) is None:
+                    groups = re.search(REGEX_NIC, tst_data["parent"])
+                    nic = groups.group(0) if groups else ""
+                    name = "{0}-{1}".format(nic, "-".join(tst_data["name"].
+                                                          split("-")[:-1]))
+                    if "across testbeds" in table["title"].lower() or \
+                            "across topologies" in table["title"].lower():
+                        name = name.\
+                            replace("1t1c", "1c").replace("2t1c", "1c").\
+                            replace("2t2c", "2c").replace("4t2c", "2c").\
+                            replace("4t4c", "4c").replace("8t4c", "4c")
+                    tbl_dict[tst_name_mod] = {"name": name,
+                                              "ref-data": list(),
+                                              "cmp-data": list()}
                 try:
                     # TODO: Re-work when NDRPDRDISC tests are not used
                     if table["include-tests"] == "MRR":
@@ -317,10 +331,8 @@ def table_performance_comparison(table, input_data):
                                 tst_data["throughput"]["NDR"]["LOWER"])
                     else:
                         continue
-                except KeyError:
+                except (KeyError, TypeError):
                     pass
-                except TypeError:
-                    tbl_dict.pop(tst_name_mod, None)
     if history:
         for item in history:
             for job, builds in item["data"].items():
@@ -399,6 +411,8 @@ def table_performance_comparison(table, input_data):
             item.extend([None, None])
         if item[-4] is not None and item[-2] is not None and item[-4] != 0:
             item.append(int(relative_change(float(item[-4]), float(item[-2]))))
+        else:
+            item.append(None)
         if len(item) == len(header):
             tbl_lst.append(item)
 

©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.