From 88b65b76595748f0b5c3d057088516d13c376a4c Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Fri, 17 Feb 2023 14:03:22 +0100 Subject: C-Dash: fix latency graphs for iterative data Signed-off-by: Tibor Frank Change-Id: I7a4a74ead1fa9573206fccab72a70216da082050 --- csit.infra.dash/app/cdash/report/graphs.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'csit.infra.dash/app/cdash/report') diff --git a/csit.infra.dash/app/cdash/report/graphs.py b/csit.infra.dash/app/cdash/report/graphs.py index 2d1f4b1873..870f16a533 100644 --- a/csit.infra.dash/app/cdash/report/graphs.py +++ b/csit.infra.dash/app/cdash/report/graphs.py @@ -121,16 +121,11 @@ def graph_iterative(data: pd.DataFrame, sel:dict, layout: dict, if itm["testtype"] == "mrr": y_data_raw = itm_data[C.VALUE_ITER[ttype]].to_list()[0] - y_data = [(y * norm_factor) for y in y_data_raw] - if len(y_data) > 0: - y_tput_max = \ - max(y_data) if max(y_data) > y_tput_max else y_tput_max else: y_data_raw = itm_data[C.VALUE_ITER[ttype]].to_list() - y_data = [(y * norm_factor) for y in y_data_raw] - if y_data: - y_tput_max = \ - max(y_data) if max(y_data) > y_tput_max else y_tput_max + y_data = [(y * norm_factor) for y in y_data_raw] + if y_data: + y_tput_max = max(max(y_data), y_tput_max) nr_of_samples = len(y_data) tput_kwargs = dict( @@ -153,7 +148,10 @@ def graph_iterative(data: pd.DataFrame, sel:dict, layout: dict, y_lat_row = itm_data[C.VALUE_ITER["pdr-lat"]].to_list() y_lat = [(y / norm_factor) for y in y_lat_row] if y_lat: - y_lat_max = max(y_lat) if max(y_lat) > y_lat_max else y_lat_max + try: + y_lat_max = max(max(y_lat), y_lat_max) + except TypeError: + continue nr_of_samples = len(y_lat) lat_kwargs = dict( y=y_lat, -- cgit 1.2.3-korg