Skip to content

Commit

Permalink
[mq] working branch - merge 55ed398 on top of main at 4da0394
Browse files Browse the repository at this point in the history
{"baseBranch":"main","baseCommit":"4da0394865a0af94c701f4cea401c8c945ecb060","createdAt":"2024-12-11T14:52:39.152414Z","headSha":"55ed39859f9b031ee33a5e1eec1446b87f62b792","id":"27f306ff-4448-4f21-bac2-1980439a1e72","priority":"200","pullRequestNumber":"32015","queuedAt":"2024-12-11T14:52:39.151158Z","status":"STATUS_QUEUED","waitingOnQueuesIds":["3816c921-b9e4-497c-83bb-904ddebdf889_414"]}
  • Loading branch information
dd-mergequeue[bot] authored Dec 11, 2024
2 parents 54fad74 + 55ed398 commit 6579241
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tasks/ebpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@ def _try_delete_github_comment(msg: str):
max_complexity_abs_change = -9e9
threshold_for_max_limit = 0.85
programs_now_below_limit, programs_now_above_limit = 0, 0
has_programs_with_changes = False
for program, entries in sorted(program_complexity.items(), key=lambda x: max(e[2] for e in x[1])):
avg_new_complexity, avg_old_complexity = 0, 0
highest_new_complexity, highest_old_complexity = 0, 0
Expand Down Expand Up @@ -833,8 +834,11 @@ def _try_delete_github_comment(msg: str):
programs_now_above_limit += 1

abs_change = new_complexity - old_complexity
max_complexity_rel_change = max(max_complexity_rel_change, abs_change / old_complexity)
max_complexity_abs_change = max(max_complexity_abs_change, abs_change)

if abs_change != 0:
max_complexity_rel_change = max(max_complexity_rel_change, abs_change / old_complexity)
max_complexity_abs_change = max(max_complexity_abs_change, abs_change)
has_programs_with_changes = True

avg_new_complexity /= len(entries)
avg_old_complexity /= len(entries)
Expand All @@ -854,6 +858,12 @@ def _try_delete_github_comment(msg: str):
]
summarized_complexity_changes.append(row)

# Reset the max values if we have no programs with changes, as we don't want the -9e9 values
# which are used as the initial values
if not has_programs_with_changes:
max_complexity_abs_change = 0
max_complexity_rel_change = 0

headers = ["Program", "Avg. complexity", "Distro with highest complexity", "Distro with lowest complexity"]
summarized_complexity_changes = sorted(summarized_complexity_changes, key=lambda x: x[0])

Expand Down

0 comments on commit 6579241

Please sign in to comment.