aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app/cdash/trending
diff options
context:
space:
mode:
Diffstat (limited to 'csit.infra.dash/app/cdash/trending')
-rw-r--r--csit.infra.dash/app/cdash/trending/graphs.py24
-rw-r--r--csit.infra.dash/app/cdash/trending/layout.py27
-rw-r--r--csit.infra.dash/app/cdash/trending/layout.yaml40
3 files changed, 87 insertions, 4 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(
diff --git a/csit.infra.dash/app/cdash/trending/layout.py b/csit.infra.dash/app/cdash/trending/layout.py
index 84a68f5050..d08f911036 100644
--- a/csit.infra.dash/app/cdash/trending/layout.py
+++ b/csit.infra.dash/app/cdash/trending/layout.py
@@ -265,7 +265,7 @@ class Layout:
dbc.Offcanvas(
class_name="w-50",
id="offcanvas-metadata",
- title="Throughput And Latency",
+ title="Detailed Information",
placement="end",
is_open=False,
children=[
@@ -646,9 +646,21 @@ class Layout:
tab_items.append(
dbc.Tab(
children=dcc.Graph(
- id={"type": "graph", "index": "lat"},
+ id={"type": "graph", "index": "bandwidth"},
figure=graphs[1]
),
+ label="Bandwidth",
+ tab_id="tab-bandwidth"
+ )
+ )
+
+ if graphs[2]:
+ tab_items.append(
+ dbc.Tab(
+ children=dcc.Graph(
+ id={"type": "graph", "index": "lat"},
+ figure=graphs[2]
+ ),
label="Latency",
tab_id="tab-lat"
)
@@ -1690,7 +1702,14 @@ class Layout:
trigger = Trigger(callback_context.triggered)
try:
- idx = 0 if trigger.idx == "tput" else 1
+ if trigger.idx == "tput":
+ idx = 0
+ elif trigger.idx == "bandwidth":
+ idx = 1
+ elif trigger.idx == "lat":
+ idx = 2
+ else:
+ raise PreventUpdate
graph_data = graph_data[idx]["points"][0]
except (IndexError, KeyError, ValueError, TypeError):
raise PreventUpdate
@@ -1721,6 +1740,8 @@ class Layout:
if trigger.idx == "tput":
title = "Throughput"
+ elif trigger.idx == "bandwidth":
+ title = "Bandwidth"
elif trigger.idx == "lat":
title = "Latency"
hdrh_data = graph_data.get("customdata", None)
diff --git a/csit.infra.dash/app/cdash/trending/layout.yaml b/csit.infra.dash/app/cdash/trending/layout.yaml
index 5e41b03118..2fcb206153 100644
--- a/csit.infra.dash/app/cdash/trending/layout.yaml
+++ b/csit.infra.dash/app/cdash/trending/layout.yaml
@@ -38,6 +38,46 @@ plot-trending-tput:
hoverlabel:
namelength: -1
+plot-trending-bandwidth:
+ autosize: True
+ showlegend: False
+ yaxis:
+ showticklabels: True
+ tickformat: ".3s"
+ title: "Bandwidth [bps]"
+ hoverformat: ".5s"
+ gridcolor: "rgb(238, 238, 238)"
+ linecolor: "rgb(238, 238, 238)"
+ showline: True
+ zeroline: False
+ tickcolor: "rgb(238, 238, 238)"
+ linewidth: 1
+ showgrid: True
+ xaxis:
+ title: 'Date [MMDD]'
+ type: "date"
+ autorange: True
+ fixedrange: False
+ showgrid: True
+ gridcolor: "rgb(238, 238, 238)"
+ showline: True
+ linecolor: "rgb(238, 238, 238)"
+ zeroline: False
+ linewidth: 1
+ showticklabels: True
+ tickcolor: "rgb(238, 238, 238)"
+ tickmode: "auto"
+ tickformat: "%m%d"
+ margin:
+ r: 20
+ b: 0
+ t: 5
+ l: 70
+ paper_bgcolor: "#fff"
+ plot_bgcolor: "#fff"
+ hoverlabel:
+ namelength: -1
+
plot-trending-lat:
autosize: True
showlegend: False