X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_tables.py;h=645892614e70d8630543b0bd6caad152cd17b309;hb=52eabb71d784978afa48f7ac2f5d53a228b256ec;hp=f621c56d99e22eee5d124910fc5e933f0036da21;hpb=ea195d1dd99a65736956c9b97e79ba0367b6206b;p=csit.git diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index f621c56d99..645892614e 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -194,10 +194,10 @@ def table_performance_improvements(table, input_data): line_lst = list() for item in data: if isinstance(item["data"], str): - line_lst.append(item["data"]) # 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"])) elif item["data"] is None: @@ -269,7 +269,7 @@ def table_performance_improvements(table, input_data): else: tbl_item.append({"data": None}) except (IndexError, ValueError, TypeError): - logging.error("No data for {0}".format(tbl_item[1]["data"])) + logging.error("No data for {0}".format(tbl_item[0]["data"])) tbl_item.append({"data": None}) continue else: @@ -299,19 +299,19 @@ def table_performance_improvements(table, input_data): else: rel_change = item[-1]["data"] if "ndr_top" in file_name \ - and "ndr" in item[1]["data"] \ + and "ndr" in item[0]["data"] \ and rel_change >= 10.0: _write_line_to_file(file_handler, item) elif "pdr_top" in file_name \ - and "pdr" in item[1]["data"] \ + and "pdr" in item[0]["data"] \ and rel_change >= 10.0: _write_line_to_file(file_handler, item) elif "ndr_low" in file_name \ - and "ndr" in item[1]["data"] \ + and "ndr" in item[0]["data"] \ and rel_change < 10.0: _write_line_to_file(file_handler, item) elif "pdr_low" in file_name \ - and "pdr" in item[1]["data"] \ + and "pdr" in item[0]["data"] \ and rel_change < 10.0: _write_line_to_file(file_handler, item)