Skip to content

Commit

Permalink
Fix: behaviour for missing build data
Browse files Browse the repository at this point in the history
  • Loading branch information
Coersi99 committed Jan 17, 2024
1 parent 5e56b23 commit 96e4d3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions local_plotting/data_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def load_data(repo_path, n, branch_name, metrics_type):
#skip as no build was created
continue

# If there are no references return None
if len(metrics_commits) == 0:
return None

blob_data = map(get_blob_data, metrics_refs)

# Extract commit dates, messages, and shas for plotting
Expand Down
3 changes: 3 additions & 0 deletions local_plotting/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def main():
try:
n = int(n)
build_data = load_data(repo_path, n, branch, metrics_type)
if build_data is None:
print("No metrics references could be found. Make sure to run 'git fetch origin refs/graalvm-metrics/*:refs/graalvm-metrics/*' first.")
exit()
plot_data(build_data, branch, metrics_type)

except Exception as e:
Expand Down

0 comments on commit 96e4d3c

Please sign in to comment.