aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation_new/generator_tables.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-01-07 09:56:41 +0100
committerTibor Frank <tifrank@cisco.com>2019-01-07 11:47:30 +0000
commitd1c1b27d17033799cd586a079820d708cc8a541c (patch)
treed306fba55a884dfae2354f91249d4f252754830e /resources/tools/presentation_new/generator_tables.py
parent38e9b40d1472549abe0f3836efc3bcaa408e90a1 (diff)
Trending: Add latest changes to the "new" dir
Change-Id: Ib5d1c9561c5d21f2d72b5c1b643c114f37bacd1a Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation_new/generator_tables.py')
-rw-r--r--resources/tools/presentation_new/generator_tables.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/resources/tools/presentation_new/generator_tables.py b/resources/tools/presentation_new/generator_tables.py
index 7590daa8fe..77243744f9 100644
--- a/resources/tools/presentation_new/generator_tables.py
+++ b/resources/tools/presentation_new/generator_tables.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -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"])