Skip to content

Commit

Permalink
fix: dereference when no failures in bucket
Browse files Browse the repository at this point in the history
Signed-off-by: Jaime Silvela <[email protected]>
  • Loading branch information
jsilvela committed Jun 5, 2024
1 parent 27ef093 commit bc95e16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion summarize_test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,9 @@ def compute_thermometer_on_metric(summary, metric, embed=True):
output = f"{metric_name(metric)} thermometer:\n\n"
for bucket_hits in summary[metric]["total"].items():
bucket = bucket_hits[0] # the items() call returns (bucket, hits) pairs
failures = summary[metric]["failed"][bucket]
failures = 0
if bucket in summary[metric]["failed"]:
failures = summary[metric]["failed"][bucket]
runs = summary[metric]["total"][bucket]
success_percent = (1 - failures / runs) * 100
color = compute_semaphore(success_percent, embed)
Expand Down

0 comments on commit bc95e16

Please sign in to comment.