[SERVER-72756] [CQF] Reduce runtime of interval permutation/fuzzer test Created: 11/Jan/23 Updated: 27/Oct/23 Resolved: 20/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Boros | Assignee: | Backlog - Query Optimization |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 137 | ||||||||||||
| Description |
|
Recent changes to this test has doubled the time run_unittests takes for a windows variant. We should try to make this test shorter, since it currently tests 320,000 interval combinations. I recommend changing the bitset size from 10 to 7. n=7 tests all of the useful cases than n=10 does, and eliminates redundant tests, like the following: [1, 2] U [5, 6] = [1, 2] U [5, 6] These essentially test the same thing, that we don't accidentally merge two intervals that don't overlap. Testing both is unnecessary. n=7 reduces the combinations tested from 320,000 to 77,000. I also think we could add a move iterator here, and a std::move here. |
| Comments |
| Comment by David Percy [ 20/Apr/23 ] |
|
It looks like this is no longer a problem. We moved this test to its own binary, interval_simplify_test, which apparently takes 1s to run in CI. |
| Comment by David Percy [ 19/Jan/23 ] |
|
We could also move slow query-specific unittests to their own suite: |
| Comment by David Percy [ 19/Jan/23 ] |
|
I think a typical patch build only runs run_unittests once per platform now (Linux, Windows) rather than once per build variant. The task was moved into the "! Linux x86 Shared Library Compile & Static Analysis" variant. |
| Comment by Matt Boros [ 19/Jan/23 ] |
|
It seems unnecessary to have this run every time a variant has run_unittests, since it's so specific to CQF |
| Comment by Matt Boros [ 19/Jan/23 ] |
|
I did make some improvements, but also changed the bitset to size 11 to include minkey/maxkey in the permutations. I think additional testing made the runtime longer overall. Is there a way to only run this unittest in certain variants? That might be the best solution |