From 86ec9713ecde3d92ec4585d487ddfac5077428c8 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Tue, 10 Oct 2023 08:14:18 +0000 Subject: C-Dash: Add bandwidth to trending graphs - NDRPDR tests only - MRR to be done when data is in parquets Change-Id: If2b1f76d5e2dc6f3a480eeb0950e7ab9550f8901 Signed-off-by: Tibor Frank --- csit.infra.dash/app/cdash/trending/graphs.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'csit.infra.dash/app/cdash/trending/graphs.py') diff --git a/csit.infra.dash/app/cdash/trending/graphs.py b/csit.infra.dash/app/cdash/trending/graphs.py index a1d61a07fc..fcfee26e3f 100644 --- a/csit.infra.dash/app/cdash/trending/graphs.py +++ b/csit.infra.dash/app/cdash/trending/graphs.py @@ -162,6 +162,12 @@ def graph_trending( f"latency [{row[C.UNIT['hoststack-latency']]}]: " f"{row[C.VALUE['hoststack-latency']]:,.0f}
" ) + elif ttype in ("ndr", "pdr"): # Add mrr + test_type = f"{ttype}-bandwidth" + add_info = ( + f"bandwidth [{row[C.UNIT[test_type]]}]: " + f"{row[C.VALUE[test_type]]:,.0f}
" + ) else: add_info = str() hover_itm = hover_itm.replace( @@ -295,6 +301,7 @@ def graph_trending( fig_tput = None fig_lat = None + fig_band = None y_units = set() for idx, itm in enumerate(sel): df = select_trending_data(data, itm) @@ -326,6 +333,19 @@ def graph_trending( fig_tput = go.Figure() fig_tput.add_traces(traces) + if ttype in ("ndr", "pdr"): # Add mrr + traces, _ = _generate_trending_traces( + f"{ttype}-bandwidth", + itm["id"], + df, + get_color(idx), + norm_factor + ) + if traces: + if not fig_band: + fig_band = go.Figure() + fig_band.add_traces(traces) + if itm["testtype"] == "pdr": traces, _ = _generate_trending_traces( "latency", @@ -346,10 +366,12 @@ def graph_trending( fig_layout["yaxis"]["title"] = \ f"Throughput [{'|'.join(sorted(y_units))}]" fig_tput.update_layout(fig_layout) + if fig_band: + fig_band.update_layout(layout.get("plot-trending-bandwidth", dict())) if fig_lat: fig_lat.update_layout(layout.get("plot-trending-lat", dict())) - return fig_tput, fig_lat + return fig_tput, fig_band, fig_lat def graph_tm_trending( -- cgit 1.2.3-korg