aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_tables.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-01-03 10:30:30 +0100
committerTibor Frank <tifrank@cisco.com>2019-01-04 15:09:41 +0000
commit6c3d971c8b529d094f7c7355e685ea5ab63904e5 (patch)
tree51f8a5f4ed3e973d8facd8b8866c03ff2b31bd0b /resources/tools/presentation/generator_tables.py
parentcebbe0a29e2c6329c54d09a77a64e874703c7d4f (diff)
Trending: Remove unneeded tests from Dashboard
Change-Id: I0f57735bcc578b42994721ca88dc1bb60af475de Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_tables.py')
-rw-r--r--resources/tools/presentation/generator_tables.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index 7590daa8fe..3ad1e3c756 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -497,12 +497,15 @@ def table_performance_trending_dashboard(table, input_data):
if classification_lst:
if isnan(rel_change_last) and isnan(rel_change_long):
continue
+ if (isnan(last_avg) or
+ isnan(rel_change_last) or
+ isnan(rel_change_long)):
+ continue
tbl_lst.append(
[tbl_dict[tst_name]["name"],
- '-' if isnan(last_avg) else
round(last_avg / 1000000, 2),
- '-' if isnan(rel_change_last) else rel_change_last,
- '-' if isnan(rel_change_long) else rel_change_long,
+ rel_change_last,
+ rel_change_long,
classification_lst[-win_size:].count("regression"),
classification_lst[-win_size:].count("progression")])
@@ -798,9 +801,11 @@ def table_failed_tests(table, input_data):
generated,
input_data.metadata(job, build).get("version", ""),
build)
- except (TypeError, KeyError):
- pass # No data in output.xml for this test
+ except (TypeError, KeyError) as err:
+ logging.warning("tst_name: {} - err: {}".
+ format(tst_name, repr(err)))
+ max_fails = 0
tbl_lst = list()
for tst_data in tbl_dict.values():
fails_nr = 0
@@ -811,6 +816,7 @@ def table_failed_tests(table, input_data):
fails_last_vpp = val[2]
fails_last_csit = val[3]
if fails_nr:
+ max_fails = fails_nr if fails_nr > max_fails else max_fails
tbl_lst.append([tst_data["name"],
fails_nr,
fails_last_date,
@@ -819,7 +825,7 @@ def table_failed_tests(table, input_data):
tbl_lst.sort(key=lambda rel: rel[2], reverse=True)
tbl_sorted = list()
- for nrf in range(table["window"], -1, -1):
+ for nrf in range(max_fails, -1, -1):
tbl_fails = [item for item in tbl_lst if item[1] == nrf]
tbl_sorted.extend(tbl_fails)
file_name = "{0}{1}".format(table["output-file"], table["output-file-ext"])