Skip to content

Try to improve incremental build times for tests#650

Merged
arxanas merged 13 commits intomasterfrom
arxanas/build2
Dec 7, 2022
Merged

Try to improve incremental build times for tests#650
arxanas merged 13 commits intomasterfrom
arxanas/build2

Conversation

@arxanas
Copy link
Copy Markdown
Owner

@arxanas arxanas commented Nov 14, 2022

The goal is to improve incremental test times.

Before:

$ hyperfine --warmup 3 --prepare 'echo "// @nocommit test" >>git-branchless/tests/command/test_amend.rs' 'cargo test --test mod --no-run'   
Benchmark 1: cargo test --test mod --no-run
  Time (mean ± σ):      6.927 s ±  0.123 s    [User: 7.652 s, System: 1.738 s]
  Range (min … max):    6.754 s …  7.161 s    10 runs

After:

$ hyperfine --warmup 3 --prepare 'echo "// @nocommit test" >>git-branchless/tests/test_amend.rs' 'cargo test --test test_amend --no-run'   
Benchmark 1: cargo test --test test_amend --no-run
  Time (mean ± σ):      1.771 s ±  0.012 s    [User: 1.471 s, System: 0.330 s]
  Range (min … max):    1.750 s …  1.793 s    10 runs

The cargo test no-op time is pretty high (~500ms), which set an unfortunate lower bound on incremental test time:

$ hyperfine --warmup 3 'cargo test --test test_amend --no-run'
Benchmark 1: cargo test --test test_amend --no-run
  Time (mean ± σ):     466.1 ms ±   5.9 ms    [User: 321.7 ms, System: 109.5 ms]
  Range (min … max):   455.9 ms … 475.6 ms    10 runs

@arxanas arxanas force-pushed the arxanas/build2 branch 2 times, most recently from 4b243fa to e437dde Compare November 14, 2022 21:05
Base automatically changed from arxanas/cleanup to master November 15, 2022 04:25
@arxanas arxanas force-pushed the arxanas/build2 branch 3 times, most recently from 4b4f3e2 to 2181fc9 Compare November 28, 2022 23:46
@arxanas arxanas force-pushed the arxanas/build2 branch 3 times, most recently from bd7a0dd to 5e761a6 Compare December 7, 2022 20:03
@arxanas arxanas marked this pull request as ready for review December 7, 2022 21:28
@arxanas arxanas merged commit 7659bae into master Dec 7, 2022
@arxanas arxanas deleted the arxanas/build2 branch December 7, 2022 21:28
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