aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2024-05-28 08:21:08 +0000
committerTibor Frank <tifrank@cisco.com>2024-05-28 08:26:54 +0000
commit8e60591baa0f4460dc4b6cd8c0252b10f299354d (patch)
tree71408c0592e99543e284e39fa1bcff9f9a790512
parenta2d74de746a017316458d340fed44157266b5b6d (diff)
C-Dash: Fix: Zero division error
Change-Id: Ie3a61153c3e286f196617be438c2056a001b6faa Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r--csit.infra.dash/app/cdash/comparisons/tables.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/csit.infra.dash/app/cdash/comparisons/tables.py b/csit.infra.dash/app/cdash/comparisons/tables.py
index 0e32f38b6c..5f6ba2db2a 100644
--- a/csit.infra.dash/app/cdash/comparisons/tables.py
+++ b/csit.infra.dash/app/cdash/comparisons/tables.py
@@ -315,11 +315,13 @@ 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:
+ break
+ 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)