Skip to content

Commit b7ab26c

Browse files
committed
ensure workflow fails if benchmark degredation >10%
1 parent ecc08c5 commit b7ab26c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/asv_benchmark_pr.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,9 @@ jobs:
4949
--no-stats --interleave-rounds -a repeat=3 || true
5050
5151
- name: BENCHMARK RESULTS
52-
run: asv compare --factor=1.1 --no-stats --split upstream/main HEAD
52+
run: |
53+
asv compare --factor=1.1 --no-stats --split upstream/main HEAD | tee ${{ env.BENCHMARKS_OUTPUT }}
54+
if grep -q "Benchmarks that have got worse" "${{ env.BENCHMARKS_OUTPUT }}"; then
55+
echo "Performance degradation detected!"
56+
exit 1
57+
fi

0 commit comments

Comments
 (0)