aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/app/cdash/comparisons/tables.py
diff options
context:
space:
mode:
Diffstat (limited to 'csit.infra.dash/app/cdash/comparisons/tables.py')
-rw-r--r--csit.infra.dash/app/cdash/comparisons/tables.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/csit.infra.dash/app/cdash/comparisons/tables.py b/csit.infra.dash/app/cdash/comparisons/tables.py
index 0e32f38b6c..208dea3dc8 100644
--- a/csit.infra.dash/app/cdash/comparisons/tables.py
+++ b/csit.infra.dash/app/cdash/comparisons/tables.py
@@ -232,7 +232,7 @@ def comparison_table(
:returns: A list of simple items.
:rtype: list
"""
- l_infra = sel["infra"].split("-")
+ l_infra = sel["infra"].rsplit("-", maxsplit=2)
selection = list()
for core in sel["core"]:
for fsize in sel["frmsize"]:
@@ -240,8 +240,8 @@ def comparison_table(
selection.append({
"dut": sel["dut"],
"dutver": sel["dutver"],
- "tbed": f"{l_infra[0]}-{l_infra[1]}",
- "nic": l_infra[2],
+ "tbed": l_infra[0],
+ "nic": l_infra[1],
"driver": l_infra[-1].replace("_", "-"),
"core": core,
"frmsize": fsize,
@@ -276,11 +276,6 @@ def comparison_table(
if r_data.empty or c_data.empty:
return str(), pd.DataFrame()
- 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"])
@@ -315,11 +310,20 @@ def comparison_table(
else:
c_row = c_data[c_data["name"] == row["name"]]
if not c_row.empty:
- unit.add(f"{s_unit_factor}{row['unit']}")
r_mean = row["mean"]
r_std = row["stdev"]
c_mean = c_row["mean"].values[0]
c_std = c_row["stdev"].values[0]
+ if r_mean == 0.0 or c_mean == 0.0:
+ continue
+ if format == "html" and "Latency" not in r_sel["ttype"]:
+ if row["unit"] == "bps":
+ unit_factor, s_unit_factor = (1e9, "G")
+ else:
+ unit_factor, s_unit_factor = (1e6, "M")
+ else:
+ unit_factor, s_unit_factor = (1, str())
+ unit.add(f"{s_unit_factor}{row['unit']}")
l_name.append(row["name"])
l_r_mean.append(r_mean / unit_factor)
l_r_std.append(r_std / unit_factor)