Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Two shared costs set the time of many listed slow tests. - pplx-space-api hashed every test password at bcrypt cost 12, 0.3-0.5 s per hash on a loaded CI runner. The external-console fixture, session and identity tests, and native-build ownership cases each pay two to four. hash_password now uses cost 4 when the crate's own tests build it, and 12 otherwise. verify_password reads the cost from the stored hash, so the same paths run. In CI the 48 affected tests went from 75.8 s to 35.4 s in total. - sha2 ran at opt-level 0 over mebibytes of rootfs images. Optimized, the template-mgr tests went from 27.1 s to 8.3 s in total. A CI trial that optimized every dependency added 3.5 minutes to the uncached build and nothing to the run as a whole, so only sha2 joins the existing per-package overrides. The 57 exceptions of affected tests that now run under 0.8 s are removed, as are two whose tests #1222 deleted. 220 remain.
139fccb to
dae0b10
Compare
Summary
Two costs shared by many of the tests listed in
ci/test-duration-budget.tomlgo away:pplx-space-apitests.hash_passwordhashed every test password at cost 12, which takes 0.3-0.5 s per hash on a loaded CI runner. The external-console fixture, the session and identity tests, and the native-build ownership cases each pay for two to four hashes. Under the crate's own tests it now uses cost 4, bcrypt's minimum; outside them it stays at 12.verify_passwordreads the cost from the stored hash, so login and verification run the same code either way.sha2at opt-level 0. The template-mgr tests hash mebibytes of rootfs images.sha2now joinslibsqlite3-sys,bcryptandblowfishin the per-package test overrides.It removes 59 exceptions, so 220 remain: the 57 affected tests that now run under 0.8 s (their old slowest runs were about twice their median), and two whose tests #1222 deleted.
Why only two crates. A throwaway trial, #1418, set
[profile.test.package."*"] opt-level = 2on top of #1417:Optimizing everything costs build time and gave the test run nothing. Per crate, on the same tests in both runs:
sha2(template-mgr rootfs and import)md-5(object-store uploads)aesand related (common-io)base64,crc, volmgr's cryptoOnly
sha2gave a clear gain.md-5looked faster in the trial, but this PR's first CI run showed no gain (6.1 s before, 6.3 s after), so it is not included.Stack
Validation
sha2andmd-5comes from trial: optimize every dependency under cargo test (do not merge) #1418's Rust tests job, compared test by test with ci: drop the duration exceptions of tests that stay under the limit #1417's.Severity and risk
Severity: does not apply; this is a CI speedup.
Risk:
hash_password, keep 12. No test asserts the cost.sha2changes profile, so the first build after merge rebuilds it and every crate that depends on it; on the first head that build took 3m36s against 2m28s. Later builds reuse main's copy. Debugging intosha2from a test is harder.AI assistance: Claude Code drafted the change, measured it and wrote this description.
🤖 Generated with Claude Code
Summary by CodeRabbit
sha2dependency in test builds.