aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2024-06-24 08:49:16 +0000
committerTibor Frank <tifrank@cisco.com>2024-06-24 08:50:40 +0000
commit17791dda1d6e2d8ce0e963239c571ea66e9f2a69 (patch)
treec60b62119edf8d9d576d93c8ee0ddb8d0de4273e
parent60206080f32048c08c66e6f64474a12c97520cdb (diff)
C-Dash: fix in test job statistics
Change-Id: I290b3d01f578a2809cf3b89fe91faa51b6dc2522 Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r--csit.infra.dash/app/cdash/stats/layout.py5
-rw-r--r--csit.infra.dash/app/cdash/utils/constants.py3
-rw-r--r--csit.infra.dash/app/cdash/utils/utils.py3
3 files changed, 5 insertions, 6 deletions
diff --git a/csit.infra.dash/app/cdash/stats/layout.py b/csit.infra.dash/app/cdash/stats/layout.py
index 616a4028e6..6f7031aedc 100644
--- a/csit.infra.dash/app/cdash/stats/layout.py
+++ b/csit.infra.dash/app/cdash/stats/layout.py
@@ -92,15 +92,16 @@ class Layout:
"tbed": list()
}
for job in jobs:
+ idx = -3 if "-x-" in job else -2
lst_job = job.split("-")
d_job_info["job"].append(job)
d_job_info["dut"].append(lst_job[1])
d_job_info["ttype"].append(lst_job[3])
d_job_info["cadence"].append(lst_job[4])
- d_job_info["tbed"].append("-".join(lst_job[-2:]))
+ d_job_info["tbed"].append("-".join(lst_job[idx:]))
self._job_info = pd.DataFrame.from_dict(d_job_info)
- self._default = set_job_params(self._job_info, C.STATS_DEFAULT_JOB)
+ self._default = set_job_params(self._job_info, d_job_info["job"][0])
tst_info = {
"job": list(),
diff --git a/csit.infra.dash/app/cdash/utils/constants.py b/csit.infra.dash/app/cdash/utils/constants.py
index bafa7b7f42..7cdfe76ee7 100644
--- a/csit.infra.dash/app/cdash/utils/constants.py
+++ b/csit.infra.dash/app/cdash/utils/constants.py
@@ -490,9 +490,6 @@ class Constants:
# Layout of plot.ly graphs.
STATS_GRAPH_LAYOUT_FILE = "cdash/stats/layout.yaml"
- # The default job displayed when the page is loaded first time.
- STATS_DEFAULT_JOB = "csit-vpp-perf-mrr-daily-master-2n-icx"
-
# Default name of downloaded file with selected data.
STATS_DOWNLOAD_FILE_NAME = "stats.csv"
diff --git a/csit.infra.dash/app/cdash/utils/utils.py b/csit.infra.dash/app/cdash/utils/utils.py
index e203dfbccd..27ecd1f763 100644
--- a/csit.infra.dash/app/cdash/utils/utils.py
+++ b/csit.infra.dash/app/cdash/utils/utils.py
@@ -286,12 +286,13 @@ def set_job_params(df: pd.DataFrame, job: str) -> dict:
"""
l_job = job.split("-")
+ idx = -3 if "-x-" in job else -2
return {
"job": job,
"dut": l_job[1],
"ttype": l_job[3],
"cadence": l_job[4],
- "tbed": "-".join(l_job[-2:]),
+ "tbed": "-".join(l_job[idx:]),
"duts": generate_options(get_duts(df)),
"ttypes": generate_options(get_ttypes(df, l_job[1])),
"cadences": generate_options(get_cadences(df, l_job[1], l_job[3])),