aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_tables.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-04-17 13:43:04 +0200
committerTibor Frank <tifrank@cisco.com>2018-04-17 13:43:04 +0200
commit2387340f7050112311cd231f7d30d06731da4836 (patch)
tree669daccb94606036bd6e20f72dcbd4c6e46f2258 /resources/tools/presentation/generator_tables.py
parente3554783146e2c4f2b6b5084c8afc707787d6922 (diff)
Report, trending
Change-Id: Ib71be16f2ddf172c381b43d289a9a0000dad10b6 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.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index 985c787d2c..29e1006950 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -606,7 +606,7 @@ def table_performance_comparison_mrr(table, input_data):
item.append(round(stdev(data_t) / 1000000, 2))
else:
item.extend([None, None])
- if item[1] is not None and item[3] is not None:
+ if item[1] is not None and item[3] is not None and item[1] != 0:
item.append(int(relative_change(float(item[1]), float(item[3]))))
if len(item) == 6:
tbl_lst.append(item)
@@ -747,8 +747,10 @@ def table_performance_trending_dashboard(table, input_data):
classification = "outlier"
elif "progression" in classification_lst[first_idx:]:
classification = "progression"
- else:
+ elif "normal" in classification_lst[first_idx:]:
classification = "normal"
+ else:
+ classification = None
idx = len(classification_lst) - 1
while idx:
@@ -770,7 +772,7 @@ def table_performance_trending_dashboard(table, input_data):
# Sort the table according to the classification
tbl_sorted = list()
- for classification in ("regression", "outlier", "progression", "normal"):
+ for classification in ("regression", "progression", "outlier", "normal"):
tbl_tmp = [item for item in tbl_lst if item[4] == classification]
tbl_tmp.sort(key=lambda rel: rel[0])
tbl_sorted.extend(tbl_tmp)