CSIT-1041: Trending dashboard 04/12004/2
authorTibor Frank <tifrank@cisco.com>
Mon, 23 Apr 2018 11:30:48 +0000 (13:30 +0200)
committerTibor Frank <tifrank@cisco.com>
Mon, 23 Apr 2018 11:31:39 +0000 (11:31 +0000)
Change-Id: I3b8e545bd198281af502acc6e23268e840112423
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/tools/presentation/generator_tables.py

index 238102d..9fe653c 100644 (file)
@@ -786,13 +786,15 @@ def table_performance_trending_dashboard(table, input_data):
                     else classification
                 for idx in range(first_idx, len(classification_lst)):
                     if classification_lst[idx] == tmp_classification:
-                        index = idx
-                        break
+                        if rel_change_lst[idx]:
+                            index = idx
+                            break
                 for idx in range(index+1, len(classification_lst)):
                     if classification_lst[idx] == tmp_classification:
-                        if (abs(rel_change_lst[idx]) >
-                                abs(rel_change_lst[index])):
-                            index = idx
+                        if rel_change_lst[idx]:
+                            if (abs(rel_change_lst[idx]) >
+                                    abs(rel_change_lst[index])):
+                                index = idx
 
             trend = round(float(median_lst[-1]) / 1000000, 2) \
                 if not isnan(median_lst[-1]) else '-'

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.