X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_tables.py;h=abece8590b772d5a0b08edf0268d54f252eb51e4;hb=a03906050f719a3d80376e17cf1dc62359663433;hp=84a6a411dc33f690c86914810076018061bfbc3f;hpb=f31dbcd6553ca6e7436736a5bc3aeec8fe18cad1;p=csit.git diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index 84a6a411dc..abece8590b 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -43,9 +43,9 @@ def generate_tables(spec, data): for table in spec.tables: try: eval(table["algorithm"])(table, data) - except NameError: - logging.error("The algorithm '{0}' is not defined.". - format(table["algorithm"])) + except NameError as err: + logging.error("Probably algorithm '{alg}' is not defined: {err}". + format(alg=table["algorithm"], err=repr(err))) logging.info("Done.") @@ -819,6 +819,8 @@ def table_performance_trending_dashboard(table, input_data): classification_lst = classify_anomalies(data_t, window=14) if classification_lst: + if isnan(rel_change_last) and isnan(rel_change_long): + continue tbl_lst.append( [tbl_dict[tst_name]["name"], '-' if isnan(last_median_t) else @@ -843,7 +845,7 @@ def table_performance_trending_dashboard(table, input_data): file_name = "{0}{1}".format(table["output-file"], table["output-file-ext"]) - logging.info(" Writing file: '{0}'".format(file_name)) + logging.info(" Writing file: '{0}'".format(file_name)) with open(file_name, "w") as file_handler: file_handler.write(header_str) for test in tbl_sorted: @@ -851,7 +853,7 @@ def table_performance_trending_dashboard(table, input_data): txt_file_name = "{0}.txt".format(table["output-file"]) txt_table = None - logging.info(" Writing file: '{0}'".format(txt_file_name)) + logging.info(" Writing file: '{0}'".format(txt_file_name)) with open(file_name, 'rb') as csv_file: csv_content = csv.reader(csv_file, delimiter=',', quotechar='"') for row in csv_content: @@ -927,9 +929,18 @@ def table_performance_trending_dashboard_html(table, input_data): anchor = "#" feature = "" if c_idx == 0: - if "memif" in item: + if "lbdpdk" in item or "lbvpp" in item: + file_name = "link_bonding.html" + + elif "testpmd" in item or "l3fwd" in item: + file_name = "dpdk.html" + + elif "memif" in item: file_name = "container_memif.html" + elif "srv6" in item: + file_name = "srv6.html" + elif "vhost" in item: if "l2xcbase" in item or "l2bdbasemaclrn" in item: file_name = "vm_vhost_l2.html" @@ -987,13 +998,12 @@ def table_performance_trending_dashboard_html(table, input_data): ref = ET.SubElement(td, "a", attrib=dict(href=url)) ref.text = item - if c_idx > 0: + else: td.text = item try: with open(table["output-file"], 'w') as html_file: - logging.info(" Writing file: '{0}'". - format(table["output-file"])) + logging.info(" Writing file: '{0}'".format(table["output-file"])) html_file.write(".. raw:: html\n\n\t") html_file.write(ET.tostring(dashboard)) html_file.write("\n\t



\n")