Skip to content

Speed up tests a bit#25507

Closed
haampie wants to merge 6 commits intospack:developfrom
haampie:fix/faster-tests
Closed

Speed up tests a bit#25507
haampie wants to merge 6 commits intospack:developfrom
haampie:fix/faster-tests

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Aug 19, 2021

  • Lots of time is spent on env modifications: some_mock_env.install() is 50% faster without on inspect.xxx
  • install('--fake') is significantly faster even with mock_everything pytest fixtures
  • 2 tests do not have the correct fixtures and use the builtin repo

For me locally:

  • spack unit-test: 608.93s -> 532.28s (-13%)
  • spack unit-test -k 'install and not bindist': 81.75s -> 65.24s (-20%)

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Aug 19, 2021

name before this pr
unittests (2.7, original) 2230.26s 1838.37s (-17.6%)
unittests (2.7, clingo) 2863.46s 2647.34s ( -7.5%)
unittests (3.5, original) 1223.45s 1338.76s ( 9.4%)
unittests (3.5, clingo) 2236.52s 1521.06s (-32.0%)
unittests (3.6, original) 1399.90s 1412.14s ( 0.9%)
unittests (3.6, clingo) 1637.72s 1560.57s ( -4.7%)
unittests (3.7, original) 1542.14s 1502.20s ( -2.6%)
unittests (3.7, clingo) 1891.40s 1551.77s (-18.0%)
unittests (3.8, original) 1507.68s 1366.80s ( -9.3%)
unittests (3.8, clingo) 1926.32s 1916.17s ( -0.5%)
unittests (3.9, original) 1517.87s 1379.21s ( -9.1%)
unittests (3.9, clingo) 2315.39s 2080.76s (-10.1%)
build (3.8) 2569.17s 2286.38s (-11.0%)

Overall: -9.9%

@haampie
Copy link
Copy Markdown
Member Author

haampie commented Oct 13, 2021

Closing in favor of #26706

@haampie haampie closed this Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests General test capability(ies) utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants