5858jobs :
5959 bench :
6060 runs-on : ubuntu-latest
61- timeout-minutes : 30
61+ # The full exact suite has 260+ cases: Criterion's default 3 s warm-up
62+ # plus 5 s measurement already needs 35+ minutes, before build/analysis.
63+ timeout-minutes : 90
6264
6365 steps :
6466 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -109,8 +111,7 @@ jobs:
109111 repo: context.repo.repo,
110112 workflow_id: 'benchmarks.yml',
111113 branch: 'main',
112- status: 'completed',
113- conclusion: 'success',
114+ status: 'success',
114115 per_page: 5,
115116 });
116117
@@ -158,15 +159,16 @@ jobs:
158159 echo "::notice::Baseline found — comparing against main"
159160 echo "comparison_available=true" >> "$GITHUB_OUTPUT"
160161 # --baseline-lenient rather than --baseline: benches added on the
161- # PR branch that don't yet exist in the main baseline get a
162- # "no baseline data" notice instead of aborting the whole run.
162+ # PR branch that don't yet exist in the main baseline run without
163+ # a comparison instead of aborting the whole run.
164+ # Keep normal sampling; plots/HTML are unused by the summary.
163165 cargo bench --locked --features bench,exact --bench exact \
164- -- --baseline-lenient main 2>&1 | tee bench-output.txt
166+ -- --noplot -- baseline-lenient main 2>&1 | tee bench-output.txt
165167 else
166168 echo "::notice::No baseline found — running without comparison"
167169 echo "comparison_available=false" >> "$GITHUB_OUTPUT"
168170 cargo bench --locked --features bench,exact --bench exact \
169- 2>&1 | tee bench-output.txt
171+ -- --noplot 2>&1 | tee bench-output.txt
170172 fi
171173
172174 if grep -q "Performance has regressed" bench-output.txt; then
@@ -182,11 +184,11 @@ jobs:
182184 github.ref == 'refs/heads/main'
183185 run : >
184186 cargo bench --locked --features bench,exact --bench exact
185- -- --save-baseline main
187+ -- --noplot -- save-baseline main
186188
187189 - name : Run benchmarks (manual ref)
188190 if : github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main'
189- run : cargo bench --locked --features bench,exact --bench exact
191+ run : cargo bench --locked --features bench,exact --bench exact -- --noplot
190192
191193 - name : Upload baseline artifact
192194 if : >
@@ -208,12 +210,24 @@ jobs:
208210 comparison_available="${BENCH_COMPARISON_AVAILABLE:-}"
209211 regression="${BENCH_REGRESSION:-}"
210212
213+ # Lenient comparisons silently skip missing baselines. Require a
214+ # change report for every analyzed case before claiming coverage.
215+ if [ -f bench-output.txt ]; then
216+ analyzed="$(grep -c '^Benchmarking .*: Analyzing$' bench-output.txt || true)"
217+ compared="$(grep -c '^[[:space:]]*change:' bench-output.txt || true)"
218+ if [ "$analyzed" = "0" ] || [ "$analyzed" != "$compared" ]; then
219+ comparison_available=false
220+ fi
221+ else
222+ comparison_available=false
223+ fi
224+
211225 if [ "$comparison_available" != "true" ] || [ -z "$regression" ]; then
212226 {
213227 echo "### ❓ Benchmark Comparison Unavailable"
214228 echo ""
215229 echo "No usable comparison against the main baseline was produced."
216- echo "The benchmark still ran, but no regression claim can be made."
230+ echo "Benchmarks may be incomplete or lack a baseline; no regression claim can be made."
217231 } >> "$GITHUB_STEP_SUMMARY"
218232 echo "::warning::Benchmark comparison unavailable"
219233 elif [ "$regression" = "true" ]; then
0 commit comments