Skip to content

Commit

Permalink
bench_download tool: fail if there are no job reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Apr 17, 2023
1 parent 7720f14 commit 4b3baa3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/performance/engine-benchmarks/bench_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,14 +706,20 @@ def commit_to_str(commit: Commit) -> str:
else:
bench_runs = get_bench_runs(since, until)
if len(bench_runs) == 0:
print(f"No successful benchmarks found within period since {since} until {until}")
print(
f"No successful benchmarks found within period since {since} until {until}")
exit(1)
job_reports: List[JobReport] = []
for bench_run in bench_runs:
job_report = get_bench_report(bench_run, cache, temp_dir)
if job_report:
job_reports.append(job_report)
logging.debug(f"Got {len(job_reports)} job reports")
if len(job_reports) == 0:
print("There were 0 job_reports in the specified time interval, so "
"there is nothing to visualize or compare.")
exit(1)

if create_csv:
write_bench_reports_to_csv(job_reports, csv_fname)
logging.info(f"Benchmarks written to {csv_fname}")
Expand Down

0 comments on commit 4b3baa3

Please sign in to comment.