diff --git a/grizzly/common/status_reporter.py b/grizzly/common/status_reporter.py index 0133dafb..3380dcf9 100644 --- a/grizzly/common/status_reporter.py +++ b/grizzly/common/status_reporter.py @@ -479,7 +479,8 @@ def specific( body.append(str(timedelta(seconds=int(entry.total)))) else: body.append(f"{entry.total:0.3f}s") - body.append(f" {entry.total / report.runtime * 100:0.2f}%") + if report.runtime > 0: + body.append(f" {entry.total / report.runtime * 100:0.2f}%") body.append(f" ({avg:0.3f} avg,") body.append(f" {entry.max:0.3f} max,") body.append(f" {entry.min:0.3f} min)") diff --git a/grizzly/common/test_status_reporter.py b/grizzly/common/test_status_reporter.py index 4994632b..10f7d9ad 100644 --- a/grizzly/common/test_status_reporter.py +++ b/grizzly/common/test_status_reporter.py @@ -342,6 +342,7 @@ def test_status_reporter_05(mocker, tmp_path): assert "Runtime" in output # multiple reports status = Status.start(db_file, enable_profiling=True) + status.start_time -= 1220 status.ignored = 1 status.iteration = 50 status.results.count("uid1", "sig1")