From 8e60591baa0f4460dc4b6cd8c0252b10f299354d Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Tue, 28 May 2024 08:21:08 +0000 Subject: C-Dash: Fix: Zero division error Change-Id: Ie3a61153c3e286f196617be438c2056a001b6faa Signed-off-by: Tibor Frank --- csit.infra.dash/app/cdash/comparisons/tables.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'csit.infra.dash/app/cdash') 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) -- cgit 1.2.3-korg