enable optimizer in tests#5155
Conversation
|
@willhickey @yihau please take a look |
cebe934 to
3a892cc
Compare
0e9cab7 to
cd25b7a
Compare
cd25b7a to
fb1a433
Compare
|
Disabled optimizations for some crates until a more permanent solution for them can be found to tests there. Now that #5212 has landed accountsdb is good to go. |
fb1a433 to
f218da0
Compare
yihau
left a comment
There was a problem hiding this comment.
LGTM. however, I think we have some unsolved discussions 🤔 @ilya-bobyr do you still think we need to use a custom profile? or should we give this one a try. if things get worse, we can always revert.
steviez
left a comment
There was a problem hiding this comment.
Out of curiosity, do you have some numbers you can share for overall CI ? No worries if not, mostly curious and faster is better (as long as we aren't compromising on flakiness)
|
To clarify about the speed improvements (this is for runtime, not compile time) you may refer to some timings I've collected below. TL;DR - CPU bound tests become 4x faster, IO bound tests become 25% faster. HOWEVER the actual time to complete all tests will not change much as it is dominated by the slowest test in any given set. In the end this change will not cut CI time by 4x, but it will cut CPU usage in CI quite substantially, allowing us to run a larger volume of small tests in parallel. As noted above, compile time difference for full rebuild of agave is 15 seconds (10% more), for incremental build of one unittest the change is not perceptable. |
|
😱 New commits were pushed while the automerge label was present. |
Thank you for checking the incremental rebuild times. I do not think our CI is running more than one job per build machine. I do support more efficient resource usage. The way I understand it right now is:
Do you think it is still the right change to make? |
If CI is running tests sequentially, they will go 4x faster. If CI runs tests in parallel, the wall clock improvements will be marginal. From what I have seen so far, CI is running most tests in parallel.
It is 100% worth it just for the sake of not allowing compiler-induced UB to pass the test suites. "you test what you ship" is a thing for a reason. Arguably, a seprate CI profile should probably be made with the same build settings as --release. |
I think having a separate CI profile is the best option. At the same time, adding a CI specific profile is probably more work than just changing the existing profile. |
09ac822 to
98b9da4
Compare
55884a8 to
439165a
Compare
439165a to
45b08f9
Compare
7740d7b to
4d6a474
Compare
a0c49fa to
e7ae94e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5155 +/- ##
=======================================
Coverage 83.1% 83.1%
=======================================
Files 837 837
Lines 316869 316869
=======================================
+ Hits 263476 263507 +31
+ Misses 53393 53362 -31 🚀 New features to boost your workflow:
|
e7ae94e to
c5e258f
Compare
yihau
left a comment
There was a problem hiding this comment.
Thanks for reviving this improvement. Let's do it!
c5e258f to
2fddaec
Compare
steviez
left a comment
There was a problem hiding this comment.
I assume @yihau will be happy with the changes, but maybe we give him one more chance to look. Otherwise, I think we've addressed all known issues and this will make CI match "production" a bit more closely.
I wouldn't be surprised if some tests get more flaky as a result of this. But, I'm inclined to think that any issues like that would be from the test being inherently flaky
One minor nit - can you update the PR description to reflect the change in direction. Namely, the PR is now only impacting CI and no longer doing "Rebuilds are slow: optimizations for procmacros are not enabled either" for regular dev flow
That is sort of the point. If optimizer adds UB we will have a chance to see it.
Done! |
Problem
Summary of Changes