diff options
Diffstat (limited to 'csit.infra.dash/app/cdash/trending')
-rw-r--r-- | csit.infra.dash/app/cdash/trending/graphs.py | 25 | ||||
-rw-r--r-- | csit.infra.dash/app/cdash/trending/layout.py | 8 |
2 files changed, 28 insertions, 5 deletions
diff --git a/csit.infra.dash/app/cdash/trending/graphs.py b/csit.infra.dash/app/cdash/trending/graphs.py index 8b05f209cc..10eb392648 100644 --- a/csit.infra.dash/app/cdash/trending/graphs.py +++ b/csit.infra.dash/app/cdash/trending/graphs.py @@ -133,7 +133,8 @@ def graph_trending( customdata_samples = list() name_lst = name.split("-") for _, row in df.iterrows(): - h_tput, h_band, h_lat = str(), str(), str() + h_tput, h_band, h_lat, h_tput_trials, h_band_trials = \ + str(), str(), str(), str(), str() if ttype in ("mrr", "mrr-bandwidth"): h_tput = ( f"tput avg [{row['result_receive_rate_rate_unit']}]: " @@ -152,6 +153,23 @@ def graph_trending( f"{row['result_receive_rate_bandwidth_stdev']* nf:,.0f}" "<br>" ) + if trials: + h_tput_trials = ( + f"tput trials " + f"[{row['result_receive_rate_rate_unit']}]: " + ) + for itm in row["result_receive_rate_rate_values"]: + h_tput_trials += f"{itm * nf:,.0f}; " + h_tput_trials = h_tput_trials[:-2] + "<br>" + if pd.notna(row["result_receive_rate_bandwidth_avg"]): + h_band_trials = ( + f"bandwidth trials " + f"[{row['result_receive_rate_bandwidth_unit']}]: " + ) + for itm in row["result_receive_rate_bandwidth_values"]: + h_band_trials += f"{itm * nf:,.0f}; " + h_band_trials = h_band_trials[:-2] + "<br>" + elif ttype in ("ndr", "ndr-bandwidth"): h_tput = ( f"tput [{row['result_ndr_lower_rate_unit']}]: " @@ -224,7 +242,7 @@ def graph_trending( f"infra: {'-'.join(name_lst[1:5])}<br>" f"test: {'-'.join(name_lst[5:])}<br>" f"date: {row['start_time'].strftime('%Y-%m-%d %H:%M:%S')}<br>" - f"{h_tput}{h_band}{h_lat}" + f"{h_tput}{h_tput_trials}{h_band}{h_band_trials}{h_lat}" f"{row['dut_type']}-ref: {row['dut_version']}<br>" f"csit-ref: {row['job']}/{row['build']}" f"{hosts}" @@ -419,7 +437,8 @@ def graph_trending( "symbol": "circle" }, showlegend=True, - legendgroup=name + legendgroup=name, + hoverinfo="skip" )) return traces diff --git a/csit.infra.dash/app/cdash/trending/layout.py b/csit.infra.dash/app/cdash/trending/layout.py index b4487cf127..c844f73b65 100644 --- a/csit.infra.dash/app/cdash/trending/layout.py +++ b/csit.infra.dash/app/cdash/trending/layout.py @@ -611,7 +611,6 @@ class Layout: ) ] - def _add_plotting_col(self) -> dbc.Col: """Add column with plots. It is placed on the right side. @@ -1117,9 +1116,12 @@ class Layout: trigger = Trigger(callback_context.triggered) if trigger.type == "url" and url_params: telemetry = None + normalize = list() + show_trials = list() try: store_sel = literal_eval(url_params["store_sel"][0]) normalize = literal_eval(url_params["norm"][0]) + show_trials = literal_eval(url_params["show-trials"][0]) telemetry = literal_eval(url_params["telemetry"][0]) url_p = url_params.get("all-in-one", ["[[None]]"]) tm_all_in_one = literal_eval(url_p[0]) @@ -1166,6 +1168,7 @@ class Layout: "cl-tsttype-all-val": list(), "cl-tsttype-all-opt": C.CL_ALL_ENABLED, "cl-normalize-val": normalize, + "cl-show-trials": show_trials, "btn-add-dis": False }) store["trending-graphs"] = None @@ -1481,7 +1484,8 @@ class Layout: new_url_params = { "store_sel": store_sel, - "norm": ctrl_panel.get("cl-normalize-val") + "norm": ctrl_panel.get("cl-normalize-val"), + "show-trials": ctrl_panel.get("cl-show-trials") } if tm_panels: new_url_params["telemetry"] = tm_panels |