PAL: Process exception while writing table
[csit.git] / resources / tools / presentation / generator_tables.py
index c361598..59250d0 100644 (file)
@@ -489,10 +489,17 @@ def table_merged_details(table, input_data):
             separator = u"" if table[u'output-file'].endswith(u"/") else u"_"
             file_name = f"{table[u'output-file']}{separator}{suite_name}.csv"
             logging.info(f"      Writing file: {file_name}")
-            with open(file_name, u"wt") as file_handler:
-                file_handler.write(u",".join(header) + u"\n")
-                for item in table_lst:
-                    file_handler.write(u",".join(item) + u"\n")
+            try:
+                with open(file_name, u"wt") as file_handler:
+                    file_handler.write(u",".join(header) + u"\n")
+                    for item in table_lst:
+                        file_handler.write(u",".join(item) + u"\n")
+            except Exception as err:
+                logging.error(f"{err}")
+                logging.info(header)
+                logging.info(table_lst)
+                if file_handler:
+                    file_handler.close()
 
     logging.info(u"  Done.")
 
@@ -959,8 +966,8 @@ def table_perf_trending_dash(table, input_data):
     header = [
         u"Test Case",
         u"Trend [Mpps]",
-        u"Number of runs [#]",
-        u"Trend Change [%]",
+        u"Runs [#]",
+        u"Long-Term Change [%]",
         u"Regressions [#]",
         u"Progressions [#]"
     ]
@@ -1135,17 +1142,20 @@ def _generate_url(testbed, test_name):
     elif u"2t1c" in test_name or \
          (u"-1c-" in test_name and
           testbed in
-          (u"2n-skx", u"3n-skx", u"2n-clx", u"2n-zn2", u"2n-aws", u"3n-aws")):
+          (u"2n-icx", u"3n-icx", u"2n-skx", u"3n-skx", u"2n-clx", u"2n-zn2",
+           u"2n-aws", u"3n-aws")):
         cores = u"2t1c"
     elif u"4t2c" in test_name or \
          (u"-2c-" in test_name and
           testbed in
-          (u"2n-skx", u"3n-skx", u"2n-clx", u"2n-zn2", u"2n-aws", u"3n-aws")):
+          (u"2n-icx", u"3n-icx", u"2n-skx", u"3n-skx", u"2n-clx", u"2n-zn2",
+           u"2n-aws", u"3n-aws")):
         cores = u"4t2c"
     elif u"8t4c" in test_name or \
          (u"-4c-" in test_name and
           testbed in
-          (u"2n-skx", u"3n-skx", u"2n-clx", u"2n-zn2", u"2n-aws", u"3n-aws")):
+          (u"2n-icx", u"3n-icx", u"2n-skx", u"3n-skx", u"2n-clx", u"2n-zn2",
+           u"2n-aws", u"3n-aws")):
         cores = u"8t4c"
     else:
         cores = u""