aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--csit.infra.dash/app/cdash/comparisons/layout.py15
-rw-r--r--csit.infra.dash/app/cdash/comparisons/tables.py31
-rw-r--r--csit.infra.dash/app/cdash/utils/constants.py2
3 files changed, 38 insertions, 10 deletions
diff --git a/csit.infra.dash/app/cdash/comparisons/layout.py b/csit.infra.dash/app/cdash/comparisons/layout.py
index bb4c6dd93c..489e6ebc6a 100644
--- a/csit.infra.dash/app/cdash/comparisons/layout.py
+++ b/csit.infra.dash/app/cdash/comparisons/layout.py
@@ -62,7 +62,7 @@ CMP_PARAMS = {
"infra": "Infrastructure",
"frmsize": "Frame Size",
"core": "Number of Cores",
- "ttype": "Test Type"
+ "ttype": "Measurement"
}
@@ -142,7 +142,9 @@ class Layout:
tbs[dut][dver][infra]["ttype"].append("MRR")
elif row["test_type"] == "ndrpdr":
if "NDR" not in tbs[dut][dver][infra]["ttype"]:
- tbs[dut][dver][infra]["ttype"].extend(("NDR", "PDR", ))
+ tbs[dut][dver][infra]["ttype"].extend(
+ ("NDR", "PDR", "Latency")
+ )
elif row["test_type"] == "hoststack" and \
row["tg_type"] in ("iperf", "vpp"):
if "BPS" not in tbs[dut][dver][infra]["ttype"]:
@@ -383,7 +385,7 @@ class Layout:
children=[
dbc.InputGroup(
[
- dbc.InputGroupText("Test Type"),
+ dbc.InputGroupText("Measurement"),
dbc.Checklist(
id={"type": "ctrl-cl", "index": "ttype"},
inline=True,
@@ -865,6 +867,8 @@ class Layout:
for itm in ctrl_panel.get(f"{value}-opt"):
set_val = ctrl_panel.get(f"{value}-val")
if isinstance(set_val, list):
+ if itm["value"] == "Latency":
+ continue
if itm["value"] not in set_val:
opts.append(itm)
else:
@@ -900,8 +904,13 @@ class Layout:
if all((ctrl_panel.get("core-val"),
ctrl_panel.get("frmsize-val"),
ctrl_panel.get("ttype-val"), )):
+ if "Latency" in ctrl_panel.get("ttype-val"):
+ ctrl_panel.set({"ttype-val": ["Latency", ]})
opts = list()
for itm, label in CMP_PARAMS.items():
+ if "Latency" in ctrl_panel.get("ttype-val") and \
+ itm == "ttype":
+ continue
if len(ctrl_panel.get(f"{itm}-opt")) > 1:
if isinstance(ctrl_panel.get(f"{itm}-val"), list):
if len(ctrl_panel.get(f"{itm}-opt")) == \
diff --git a/csit.infra.dash/app/cdash/comparisons/tables.py b/csit.infra.dash/app/cdash/comparisons/tables.py
index 14d5d552af..b2bee7f9d4 100644
--- a/csit.infra.dash/app/cdash/comparisons/tables.py
+++ b/csit.infra.dash/app/cdash/comparisons/tables.py
@@ -77,16 +77,23 @@ def select_comparison_data(
for l_itm in l_df:
tmp_df.extend(l_itm)
l_df = tmp_df
+ try:
+ mean_val = mean(l_df)
+ std_val = std(l_df)
+ except (TypeError, ValueError):
+ continue
d_data["name"].append(f"{test.replace(f'{drv}-', '')}-{ttype}")
- d_data["mean"].append(int(mean(l_df) * norm_factor))
- d_data["stdev"].append(int(std(l_df) * norm_factor))
+ d_data["mean"].append(int(mean_val * norm_factor))
+ d_data["stdev"].append(int(std_val * norm_factor))
d_data["unit"].append(df[C.UNIT[ttype]].to_list()[0])
return pd.DataFrame(d_data)
lst_df = list()
for itm in selected:
- if itm["ttype"] in ("NDR", "PDR"):
+ if itm["ttype"] in ("NDR", "PDR", "Latency"):
test_type = "ndrpdr"
+ elif itm["ttype"] in ("CPS", "RPS", "BPS"):
+ test_type = "hoststack"
else:
test_type = itm["ttype"].lower()
@@ -114,16 +121,23 @@ def select_comparison_data(
inplace=True
)
- # Change the data type from ndrpdr to one of ("NDR", "PDR")
+ # Change the data type from ndrpdr to one of ("NDR", "PDR", "Latency")
if test_type == "ndrpdr":
tmp_df = tmp_df.assign(test_type=itm["ttype"].lower())
if not tmp_df.empty:
+ if normalize:
+ if itm["ttype"] == "Latency":
+ norm_factor = C.FREQUENCY[itm["tbed"]] / C.NORM_FREQUENCY
+ else:
+ norm_factor = C.NORM_FREQUENCY / C.FREQUENCY[itm["tbed"]]
+ else:
+ norm_factor = 1.0
tmp_df = _calculate_statistics(
tmp_df,
itm["ttype"].lower(),
itm["driver"],
- C.NORM_FREQUENCY / C.FREQUENCY[itm["tbed"]] if normalize else 1
+ norm_factor
)
lst_df.append(tmp_df)
@@ -194,12 +208,15 @@ def comparison_table(
})
return selection
- unit_factor, s_unit_factor = (1e6, "M") if format == "html" else (1, str())
-
r_sel = deepcopy(selected["reference"]["selection"])
c_params = selected["compare"]
r_selection = _create_selection(r_sel)
+ if format == "html" and "Latency" not in r_sel["ttype"]:
+ unit_factor, s_unit_factor = (1e6, "M")
+ else:
+ unit_factor, s_unit_factor = (1, str())
+
# Create Table title and titles of columns with data
params = list(r_sel)
params.remove(c_params["parameter"])
diff --git a/csit.infra.dash/app/cdash/utils/constants.py b/csit.infra.dash/app/cdash/utils/constants.py
index 1397179377..e9304b6b1a 100644
--- a/csit.infra.dash/app/cdash/utils/constants.py
+++ b/csit.infra.dash/app/cdash/utils/constants.py
@@ -216,6 +216,7 @@ class Constants:
"ndr": "result_ndr_lower_rate_value",
"pdr": "result_pdr_lower_rate_value",
"pdr-lat": "result_latency_forward_pdr_50_avg",
+ "latency": "result_latency_forward_pdr_50_avg",
"hoststack-cps": "result_rate_value",
"hoststack-rps": "result_rate_value",
"hoststack-bps": "result_bandwidth_value",
@@ -227,6 +228,7 @@ class Constants:
"ndr": "result_ndr_lower_rate_unit",
"pdr": "result_pdr_lower_rate_unit",
"pdr-lat": "result_latency_forward_pdr_50_unit",
+ "latency": "result_latency_forward_pdr_50_unit",
"hoststack-cps": "result_rate_unit",
"hoststack-rps": "result_rate_unit",
"hoststack-bps": "result_bandwidth_unit",