Skip to content

ci(jtreg): split shards by each test's median time over five CI runs, which the recorded times understated up to threefold - #114

Merged
Project516 merged 4 commits into
masterfrom
p516/ci-shard-times
Dec 3, 2026
Merged

Project516 merged 4 commits into
masterfrom
p516/ci-shard-times

Conversation

@Project516

Copy link
Copy Markdown
Owner

What this changes

PR CI waits for the slowest of its 8 OpenJDK shards, and the shards differ a lot: in #111's run they took 313 s to 527 s. run.ts splits tests by the times in test/jtreg/times.tsv, but those understate the slowest tests on CI two- to threefold (for example forkjoin/Integrate.java: 144 s recorded, 194 s to 461 s in recent runs), so several heavy tests can land in one shard and slow each other down.

times.tsv now holds each listed test's median time over the five most recent full CI runs (45196043415, 46290048136, 46342647928, 47144421837, 47147976351). scripts/jtreg/times.ts does that merge, and docs/development.md uses it in place of the one-run awk refresh, since one run's times vary too much.

Tests

  • Checked offline against the five runs: split by the old times or by the median of four runs, then scored the split with the fifth run's actual test times, a shard counting as max(longest test, total / 4 jobs). The slowest shard drops in two of five runs (417 s to 378 s, 421 s to 392 s) and is unchanged in the other three. Its time there is one long test.
  • pnpm typecheck passes. This PR runs no OpenJDK tests: select.ts skips times.tsv, and times.ts is not loaded by the runner.

Noticed, not fixed

  • After this, a shard's floor is its longest test, about 300 to 460 s on CI. Those tests are CPU-heavy (Integrate, RandomCanaryPi, TestSameLength, TransferTo, SpecialHeadersTest), so making the VM faster is what shortens PR CI further.

… which the recorded times understated up to threefold
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5605c45a-7d06-4208-936b-4a489480e1b3
Commits

Reviewing files that changed from the base of the PR and between 92e9861 and 68cd6a0.

Files ignored due to path filters: 1

  • test/jtreg/times.tsv is excluded by !**/*.tsv
Files selected for processing: 2

  • docs/development.md
  • scripts/jtreg/times.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

PR #114 replaces the one-run awk refresh of test/jtreg/times.tsv with a median over several CI runs. docs/development.md now documents downloading each run's times-* artifacts into per-run directories and merging them with the new scripts/jtreg/times.ts, which keeps each test's median time and preserves times for tests a run left out; times.tsv itself is regenerated (no text diff shown).


review-bot, model nvidia/nemotron-3.5-super-vl:free, verdict approve

@Project516
Project516 enabled auto-merge (squash) December 3, 2026 17:08
@Project516
Project516 disabled auto-merge December 3, 2026 17:09

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR replaces the single-run awk refresh of test/jtreg/times.tsv with a median over multiple CI runs. The new scripts/jtreg/times.ts merges times-* artifacts from several runs, sets each test's time to its median across the runs it appeared in, and preserves old times for tests absent from all runs. docs/development.md is updated to describe the new workflow, and test/jtreg/times.tsv is regenerated (no text diff shown).


review-bot, model nvidia/nemotron-3.5-super-vl:free, verdict approve

Comment thread scripts/jtreg/times.ts Resolved
Comment thread scripts/jtreg/times.ts Resolved

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR changes how test/jtreg/times.tsv is refreshed: docs/development.md now describes downloading several CI runs' times-* artifacts and merging them with the new scripts/jtreg/times.ts, which stores each test's median time across the runs and keeps the old time for tests the runs omitted. times.tsv is modified but its new text was not shown, so the recorded medians could not be verified from the diff alone.


review-bot, model nvidia/nemotron-3.5-super-vl:free, verdict approve

Comment thread scripts/jtreg/times.ts Resolved
@Project516

Copy link
Copy Markdown
Owner Author

The review could not show test/jtreg/times.tsv. Check of that file: starting from master's times.tsv and running node scripts/jtreg/times.ts on the times-* artifacts of runs 45196043415, 46290048136, 46342647928, 47144421837 and 47147976351 reproduces this PR's times.tsv byte for byte. It has 4,087 lines; 773 of them, the tests in passing.txt, take the five runs' medians, and the rest are unchanged.

@Project516
Project516 enabled auto-merge (squash) December 3, 2026 17:17

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Replaces the single-run refresh of test/jtreg/times.tsv with a median over several full CI runs. Adds scripts/jtreg/times.ts, which merges each run directory's per-shard times.tsv, takes each test's median across runs, keeps old times for tests absent from the runs, and rewrites the file sorted by time. Updates docs/development.md to describe the multi-run merge via node scripts/jtreg/times.ts instead of the one-run awk command.


review-bot, model nvidia/nemotron-3.5-super-vl:free, verdict approve

@Project516
Project516 merged commit d16f3b4 into master Dec 3, 2026
9 checks passed
@Project516
Project516 deleted the p516/ci-shard-times branch December 3, 2026 17:25
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.

1 participant