diff options
author | Tibor Frank <tifrank@cisco.com> | 2023-10-10 08:14:18 +0000 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2023-10-11 07:38:18 +0000 |
commit | 86ec9713ecde3d92ec4585d487ddfac5077428c8 (patch) | |
tree | 2918a347f80ccf9d628f9132d7d1a454043fb9ae /csit.infra.dash/app/cdash/trending/graphs.py | |
parent | c3ce59c652caaee06b3090f387f8826c15102703 (diff) |
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 <tifrank@cisco.com>
Diffstat (limited to 'csit.infra.dash/app/cdash/trending/graphs.py')
-rw-r--r-- | csit.infra.dash/app/cdash/trending/graphs.py | 24 |
1 files changed, 23 insertions, 1 deletions
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}<br>" ) + 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}<br>" + ) 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( |