aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-10-31 18:01:37 +0100
committerTibor Frank <tifrank@cisco.com>2017-10-31 17:02:59 +0000
commitc3052b69f5a26070c41488dcb07deae30376a204 (patch)
tree47777a2e65c2664fdc7ef4b72cb9a281ec559c59
parentade5d5ab0693d3671744cb8b38683d264bbc0c12 (diff)
Report: data
Change-Id: I972d3e95b2272dd2acd1e4f495f607faebd13079 Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit a7e064b331e539b3294c8c8208a4fab60c7144aa)
-rw-r--r--resources/tools/presentation/generator_tables.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index 379205cbea..7f4071bef3 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -227,21 +227,23 @@ def table_performance_improvements(table, input_data):
with open(file_name, "w") as file_handler:
file_handler.write(",".join(header) + "\n")
for item in tbl_lst:
+ if isinstance(item[-1]["data"], float):
+ rel_change = round(item[-1]["data"], 1)
+ else:
+ rel_change = item[-1]["data"]
if "ndr_top" in file_name \
and "ndr" in item[1]["data"] \
- and round(item[-1]["data"], 1) >= 10.0:
+ 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 round(item[-1]["data"], 1) >= 10.0:
+ 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 round(item[-1]["data"], 1) < 10.0:
+ and "ndr" in item[1]["data"]:
_write_line_to_file(file_handler, item)
elif "pdr_low" in file_name \
- and "pdr" in item[1]["data"] \
- and round(item[-1]["data"], 1) < 10.0:
+ and "pdr" in item[1]["data"]:
_write_line_to_file(file_handler, item)
logging.info(" Done.")