Compare commits
1 Commits
6c2c7e7b90
...
b027c83b9c
| Author | SHA1 | Date | |
|---|---|---|---|
| b027c83b9c |
@@ -1,4 +1,4 @@
|
|||||||
name: Benchmarking
|
name: Merge-Checker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -39,7 +39,6 @@ jobs:
|
|||||||
echo "matrix-timing-tests executable not found or not executable"
|
echo "matrix-timing-tests executable not found or not executable"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Compare timing results
|
- name: Compare timing results
|
||||||
id: check_diff
|
id: check_diff
|
||||||
run: |
|
run: |
|
||||||
@@ -48,11 +47,10 @@ jobs:
|
|||||||
|
|
||||||
echo "Comparing timing results for changes ≥ 0.1s (ignoring 'Timing Tests' lines)..."
|
echo "Comparing timing results for changes ≥ 0.1s (ignoring 'Timing Tests' lines)..."
|
||||||
|
|
||||||
changed=0
|
awk '
|
||||||
|
|
||||||
awk -v changed_ref=/tmp/timings_changed.flag '
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
change_threshold = 0.1
|
change_threshold = 0.1
|
||||||
|
changed = 0
|
||||||
}
|
}
|
||||||
FILENAME == "old.txt" && /^[0-9]+\.[0-9]+ s: / {
|
FILENAME == "old.txt" && /^[0-9]+\.[0-9]+ s: / {
|
||||||
label = substr($0, index($0, ":") + 2)
|
label = substr($0, index($0, ":") + 2)
|
||||||
@@ -71,30 +69,19 @@ jobs:
|
|||||||
|
|
||||||
if (old_time != "" && delta >= change_threshold) {
|
if (old_time != "" && delta >= change_threshold) {
|
||||||
printf "⚠️ %.3f s → %.3f s: %s (Δ=%.3f s)\n", old_time, new_time, label, delta
|
printf "⚠️ %.3f s → %.3f s: %s (Δ=%.3f s)\n", old_time, new_time, label, delta
|
||||||
system("touch " changed_ref)
|
changed = 1
|
||||||
} else if (old_time == "") {
|
} else if (old_time == "") {
|
||||||
printf "🆕 New timing entry: %.3f s: %s\n", new_time, label
|
printf "🆕 New timing entry: %.3f s: %s\n", new_time, label
|
||||||
system("touch " changed_ref)
|
changed = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
END {
|
END {
|
||||||
if (!system("test -f " changed_ref)) {
|
exit changed == 1 ? 0 : 1
|
||||||
exit 0
|
|
||||||
} else {
|
|
||||||
print "✅ Timings haven’t changed significantly (Δ < 0.1s)."
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
' old.txt new.txt
|
' old.txt new.txt
|
||||||
|
|
||||||
if [ -f /tmp/timings_changed.flag ]; then
|
|
||||||
echo "timings_changed=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "timings_changed=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Commit and push timing results
|
- name: Commit and push timing results
|
||||||
if: steps.check_diff.outputs.timings_changed == 'true' && github.event.pull_request.head.repo.full_name == github.repository
|
if: steps.check_diff.outcome == 'success' && github.event.pull_request.head.repo.full_name == github.repository
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "ci-bot"
|
git config --global user.name "ci-bot"
|
||||||
git config --global user.email "ci-bot@local"
|
git config --global user.email "ci-bot@local"
|
||||||
|
|||||||
Reference in New Issue
Block a user