X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_tables.py;h=65917bd4a8d3f2163d1f33f025d33aa6751f550e;hp=4b1da900681771667fcbd4845f3a278bf73d6072;hb=f2981bad427e56e55686c971fbfb29bb7455a2a5;hpb=49033c34ed62a40d280724414ff5be1c12edc5b7 diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index 4b1da90068..65917bd4a8 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -194,6 +194,9 @@ def table_performance_improvements(table, input_data): line_lst = list() for item in data: if isinstance(item["data"], str): + # Remove -?drdisc from the end + if item["data"].endswith("drdisc"): + item["data"] = item["data"][:-8] line_lst.append(item["data"]) elif isinstance(item["data"], float): line_lst.append("{:.1f}".format(item["data"])) @@ -345,6 +348,9 @@ def table_performance_comparison(table, input_data): :type input_data: InputData """ + logging.info(" Generating the table {0} ...". + format(table.get("title", ""))) + # Transform the data data = input_data.filter_data(table) @@ -377,7 +383,7 @@ def table_performance_comparison(table, input_data): try: tbl_dict[tst_name]["ref-data"].\ append(tst_data["throughput"]["value"]) - except TypeError as err: + except TypeError: pass # No data in output.xml for this test for job, builds in table["compare"]["data"].items(): @@ -432,6 +438,7 @@ def table_performance_comparison(table, input_data): table["output-file-ext"]) ] for file_name in tbl_names: + logging.info(" Writing file: '{}'".format(file_name)) with open(file_name, "w") as file_handler: file_handler.write(header_str) for test in tbl_lst: @@ -452,6 +459,7 @@ def table_performance_comparison(table, input_data): for i, txt_name in enumerate(tbl_names_txt): txt_table = None + logging.info(" Writing file: '{}'".format(txt_name)) with open(tbl_names[i], 'rb') as csv_file: csv_content = csv.reader(csv_file, delimiter=',', quotechar='"') for row in csv_content: @@ -472,6 +480,7 @@ def table_performance_comparison(table, input_data): output_file = "{0}-ndr-1t1c-top{1}".format(table["output-file"], table["output-file-ext"]) + logging.info(" Writing file: '{}'".format(output_file)) with open(output_file, "w") as out_file: out_file.write(header_str) for i, line in enumerate(lines[1:]): @@ -481,6 +490,7 @@ def table_performance_comparison(table, input_data): output_file = "{0}-ndr-1t1c-bottom{1}".format(table["output-file"], table["output-file-ext"]) + logging.info(" Writing file: '{}'".format(output_file)) with open(output_file, "w") as out_file: out_file.write(header_str) for i, line in enumerate(lines[-1:0:-1]): @@ -497,6 +507,7 @@ def table_performance_comparison(table, input_data): output_file = "{0}-pdr-1t1c-top{1}".format(table["output-file"], table["output-file-ext"]) + logging.info(" Writing file: '{}'".format(output_file)) with open(output_file, "w") as out_file: out_file.write(header_str) for i, line in enumerate(lines[1:]): @@ -506,6 +517,7 @@ def table_performance_comparison(table, input_data): output_file = "{0}-pdr-1t1c-bottom{1}".format(table["output-file"], table["output-file-ext"]) + logging.info(" Writing file: '{}'".format(output_file)) with open(output_file, "w") as out_file: out_file.write(header_str) for i, line in enumerate(lines[-1:0:-1]):