Skip to content

Remove cross-run duration weighting from test partitioning#686

Open
MatthewMckee4 wants to merge 2 commits intomainfrom
remove-duration-cache
Open

Remove cross-run duration weighting from test partitioning#686
MatthewMckee4 wants to merge 2 commits intomainfrom
remove-duration-cache

Conversation

@MatthewMckee4
Copy link
Copy Markdown
Member

Summary

The runner used to read the previous run's per-test durations from the cache and weight the partitioning algorithm by those timings to balance worker load. In practice the added complexity wasn't paying off, so this drops the cross-run read entirely and partitions using uniform test counts instead. Module-aware bin-packing is preserved (tests in the same module stay on one worker when possible; large modules still split across workers) — only the duration-based weighting is gone. --durations N still works; per-worker durations are still written and aggregated within a run.

Test plan

ci

@MatthewMckee4 MatthewMckee4 added the internal An internal refactor or improvement label Apr 15, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 15, 2026

Merging this PR will degrade performance by 18.75%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

❌ 1 regressed benchmark

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime karva_benchmark 24.7 s 30.4 s -18.75%

Comparing remove-duration-cache (73468bd) with main (faef1bf)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant