perf(runner): dispatch files longest first by the previous run's timings
Merged
OK
9d ago+145+145+012345678901234567890123456789-4-4-0123456789
What and why
- With
workers > 1, the runner orders file units by their duration in the previousreport.json, longest first (packages/e2e/src/run/units.tslongestFirst). Files new since that run go first; ties keep collection order. - Before, a long file collected late could start last and hold the run open after every other worker went idle.
- Report order is unchanged; it is sorted separately. Serial runs are untouched.
Verified
Ran it locally: yes
apps/web-benchmark,e2e run --workers 7, second run so a report exists. The suite is bounded byvirtualized-table(~70s), which now starts first.
| main | this branch | |
|---|---|---|
| run 1 | 77.9s | 77.3s (no previous report) |
| run 2 | 78.7s | 72.2s |