Skip to content

ci(bench): bump per-target timeout_minutes to 45/60/45 (fixes #152)#153

Merged
polaz merged 1 commit into
mainfrom
fix/#152-bench-timeouts
May 17, 2026
Merged

ci(bench): bump per-target timeout_minutes to 45/60/45 (fixes #152)#153
polaz merged 1 commit into
mainfrom
fix/#152-bench-timeouts

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented May 17, 2026

Summary

Today's main pushes (#148, #151, #138 → v0.0.21) all failed to publish bench data to https://structured-world.github.io/structured-zstd/dev/bench/ because 7 of the 21 bench shards hit the per-target timeout_minutes cap. When any shard fails, benchmark-aggregate and benchmark-pages never run, so no points land on the dashboard.

Which shards timed out

The bench-matrix runs 7 strategy shards on 3 targets in parallel. Of the 21 shards:

  • 14 passed in 8-25 minutes
  • 7 hit their cap exactly:
    • lazy on all 3 targets (11 levels: 5..15)
    • fast on all 3 targets (8 levels: -7..-1, 1)
    • btultra2 on i686-gnu (3 levels but slow 32-bit target)

Each level takes ~2-3 minutes through the bench binary; 11 levels exceed the 25-30 min caps.

Fix

Bump per-target timeout_minutes:

  • x86_64-gnu: 25 → 45
  • i686-gnu: 30 → 60 (slower 32-bit target)
  • x86_64-musl: 25 → 45

This was user's explicit choice over splitting heavy shards (which would parallelize better but increase the CI surface). The bumped caps leave ~50% headroom over observed worst cases:

  • Observed worst: i686-gnu/btultra2 at 30m16s, i686-gnu/fast/lazy at ~30m
  • New i686 cap: 60m — fits with margin

Test plan

  • CI green on this PR (lint, tests, all 21 bench shards complete)
  • After merge, benchmark-pages job publishes a new data point on the dashboard

Closes #152

Summary by CodeRabbit

  • Chores
    • Updated CI benchmark timeout configurations to allow extended test execution times on multiple target platforms.

Review Change Stack

… shards finish

The bench-matrix runs seven strategy shards per target. The
heaviest shards exceed the previous per-target caps on every
main push:

* lazy shard runs 11 levels (5..15) sequentially through one bench
  binary invocation. On any target this takes 25-30+ minutes,
  hitting the cap before the benchmark frame even starts on the
  last level.
* fast shard runs 8 levels (-7..-1, 1). On i686-gnu (32-bit, ~30%
  slower) this consistently exceeds the previous 30m cap.
* btultra2 shard runs 3 expensive levels (20..22). On i686-gnu the
  matcher passes alone push it past 30m.

When a single shard hits its job timeout the whole CI run is
marked failed, so benchmark-aggregate and benchmark-pages never
run and the dashboard at
https://structured-world.github.io/structured-zstd/dev/bench/
gets no new data point for that commit. This affected every main
push today (#148, #151, #138 → v0.0.21 release).

Bump per-target timeout_minutes: x86_64-gnu 25 -> 45, i686-gnu
30 -> 60, x86_64-musl 25 -> 45. The 32-bit target gets a higher
absolute cap because its bench loop is consistently ~30% slower.

Closes #152
Copilot AI review requested due to automatic review settings May 17, 2026 17:17
@polaz polaz merged commit 2a077c9 into main May 17, 2026
5 of 6 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a7e0c0bc-1a9b-4915-8104-53f3a7242751

📥 Commits

Reviewing files that changed from the base of the PR and between 32475d3 and db5b0a4.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

The CI workflow configuration increases timeout limits for three benchmark targets in the bench-matrix job. x86_64-gnu and x86_64-musl timeouts increase from 25 to 45 minutes, and i686-gnu increases from 30 to 60 minutes, allowing slower benchmark shards (lazy, fast, and btultra2 compression levels) to complete without premature termination.

Changes

Benchmark CI Timeout Configuration

Layer / File(s) Summary
Benchmark target timeout adjustment
.github/workflows/ci.yml
Timeout values updated for x86_64-gnu (25→45 min), i686-gnu (30→60 min), and x86_64-musl (25→45 min) to prevent lazy, fast, and btultra2 shards from timing out during benchmarks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

A rabbit hops through CI flows with care,
When benchmarks dragged and timeout struck despair,
Now 60 minutes, plenty time to race—
The shards complete without a time-out chase! 🐰⏱️

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#152-bench-timeouts

Comment @coderabbitai help to get the list of available commands and usage tips.

@polaz polaz deleted the fix/#152-bench-timeouts branch May 17, 2026 17:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the GitHub Actions benchmark matrix job time budgets so long-running benchmark shards (notably fast, lazy, and btultra2 on i686) complete successfully, allowing downstream aggregation and pages publishing to run reliably.

Changes:

  • Increased per-target timeout_minutes for benchmark shards to reduce shard timeouts and unblock benchmark-aggregate/benchmark-pages.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@sw-release-bot sw-release-bot Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'structured-zstd vs C FFI (x86_64-gnu)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: db5b0a4 Previous: 1e0f695 Ratio
compress/level_22_btultra2/small-4k-log-lines/matrix/c_ffi 0.112 ms 0.067 ms 1.67
compress/level_22_btultra2/decodecorpus-z000033/matrix/c_ffi 227.505 ms 171.961 ms 1.32

This comment was automatically generated by workflow using github-action-benchmark.

CC: @polaz

polaz added a commit that referenced this pull request May 17, 2026
The 45/60/45 caps from PR #153 still aren't enough for the slowest
shards (lazy, fast). Log inspection of cancelled jobs (job
76419168123, sha f3a6dad) shows linear progress with ~9s per
criterion iteration and no stalls — the bench suite simply has more
combinations (level × scenario × codec_side × stream_variant ×
{compress, decompress}) than fit in 45 min:

  ~11 levels × ~5 scenarios × 2 sides × 2 stream variants × 2 ops
    ≈ 440 iterations × 9s ≈ 66 min worst-case shard

Uniform 120 min cap (GH-hosted limit is 360 min) gives ~50% headroom
on the slowest shards and unblocks the publish chain so the
dev/bench dashboard stays current.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(bench): bump per-target timeout_minutes — current 25/30 cap fails lazy/fast shards

2 participants