From d01a3ac89dcf26bc52b04b255f80d935621c635a Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Mon, 20 Feb 2023 13:58:58 +0100 Subject: C-Dash: Add hover info to telemetry graphs Signed-off-by: Tibor Frank Change-Id: I3db2099b9cf5a73d3c465c770d852afa149a3264 --- csit.infra.dash/app/cdash/trending/graphs.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'csit.infra.dash/app') 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}
" + f"mrr stdev [{row[C.UNIT['mrr']]}]: " + f"{row['result_receive_rate_rate_stdev']:,.0f}
" + ) + elif row["test_type"] == "ndrpdr": + if "-pdr" in test: + rate = ( + f"pdr [{row[C.UNIT['pdr']]}]: " + f"{row[C.VALUE['pdr']]:,.0f}
" + ) + elif "-ndr" in test: + rate = ( + f"ndr [{row[C.UNIT['ndr']]}]: " + f"{row[C.VALUE['ndr']]:,.0f}
" + ) + else: + rate = str() + else: + rate = str() hover.append( f"date: " f"{row['start_time'].strftime('%Y-%m-%d %H:%M:%S')}
" f"value: {y_data[i]:,.0f}
" + f"{rate}" f"{row['dut_type']}-ref: {row['dut_version']}
" f"csit-ref: {row['job']}/{row['build']}
" ) -- cgit 1.2.3-korg