aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2023-02-20 13:58:58 +0100
committerTibor Frank <tifrank@cisco.com>2023-02-20 13:58:58 +0100
commitd01a3ac89dcf26bc52b04b255f80d935621c635a (patch)
treedce7400ab0a54d68916fe5629d3a03e617270431 /csit.infra.dash/app
parent28dc464d05d62c22ec6b3dee01fafffcd0ab754d (diff)
C-Dash: Add hover info to telemetry graphs
Signed-off-by: Tibor Frank <tifrank@cisco.com> Change-Id: I3db2099b9cf5a73d3c465c770d852afa149a3264
Diffstat (limited to 'csit.infra.dash/app')
-rw-r--r--csit.infra.dash/app/cdash/trending/graphs.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/csit.infra.dash/app/cdash/trending/graphs.py b/csit.infra.dash/app/cdash/trending/graphs.py
index 695bb0e287..cb1d2c6012 100644
--- a/csit.infra.dash/app/cdash/trending/graphs.py
+++ b/csit.infra.dash/app/cdash/trending/graphs.py
@@ -487,10 +487,33 @@ def graph_tm_trending(data: pd.DataFrame, layout: dict) -> list:
y_data = [float(itm) for itm in df["tm_value"].tolist()]
hover = list()
for i, (_, row) in enumerate(df.iterrows()):
+ if row["test_type"] == "mrr":
+ rate = (
+ f"mrr avg [{row[C.UNIT['mrr']]}]: "
+ f"{row[C.VALUE['mrr']]:,.0f}<br>"
+ f"mrr stdev [{row[C.UNIT['mrr']]}]: "
+ f"{row['result_receive_rate_rate_stdev']:,.0f}<br>"
+ )
+ elif row["test_type"] == "ndrpdr":
+ if "-pdr" in test:
+ rate = (
+ f"pdr [{row[C.UNIT['pdr']]}]: "
+ f"{row[C.VALUE['pdr']]:,.0f}<br>"
+ )
+ elif "-ndr" in test:
+ rate = (
+ f"ndr [{row[C.UNIT['ndr']]}]: "
+ f"{row[C.VALUE['ndr']]:,.0f}<br>"
+ )
+ else:
+ rate = str()
+ else:
+ rate = str()
hover.append(
f"date: "
f"{row['start_time'].strftime('%Y-%m-%d %H:%M:%S')}<br>"
f"value: {y_data[i]:,.0f}<br>"
+ f"{rate}"
f"{row['dut_type']}-ref: {row['dut_version']}<br>"
f"csit-ref: {row['job']}/{row['build']}<br>"
)