diff options
author | 2024-05-28 08:21:08 +0000 | |
---|---|---|
committer | 2024-06-04 09:25:57 +0000 | |
commit | 2e10b184d7470307069e5977677759c6e737c01d (patch) | |
tree | 0a1dcb57000bea9c1495f93a7ec2bc102d99025f | |
parent | 2d04236f14acbb9bf2ad0e4fe34c8d24d6f93121 (diff) |
C-Dash: Fix: Zero division error
Change-Id: Ie3a61153c3e286f196617be438c2056a001b6faa
Signed-off-by: Tibor Frank <tifrank@cisco.com>
(cherry picked from commit 8e60591baa0f4460dc4b6cd8c0252b10f299354d)
-rw-r--r-- | csit.infra.dash/app/cdash/comparisons/tables.py | 4 |
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) |