Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up Helpers::Pair test #295

Merged
merged 4 commits into from
Dec 9, 2021
Merged

Speed up Helpers::Pair test #295

merged 4 commits into from
Dec 9, 2021

Conversation

mjcarroll
Copy link
Contributor

Housekeeping on the math::Pair unittest.

I'm not sure that exhaustively testing this many pairs is worthwhile, in general.

On my system (before):

[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from HelpersTest
[ RUN      ] HelpersTest.Pair
Tested: 25048098 keys 
[       OK ] HelpersTest.Pair (5872 ms)
[----------] 1 test from HelpersTest (5872 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (5872 ms total)
[  PASSED  ] 1 test.
./bin/UNIT_Helpers_TEST --gtest_filter="*.Pair"  5.66s user 0.26s system 99% cpu 5.935 total

(after):

[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from HelpersTest
[ RUN      ] HelpersTest.Pair
Tested: 46829 keys
.[       OK ] HelpersTest.Pair (9 ms)
[----------] 1 test from HelpersTest (9 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (9 ms total)
[  PASSED  ] 1 test.
./bin/UNIT_Helpers_TEST --gtest_filter="*.Pair"  0.01s user 0.00s system 96% cpu 0.016 total

I believe that @nkoenig and @scpeters were the ones who most recently touched this function, so pinging them for reviews.

Signed-off-by: Michael Carroll [email protected]

Note to maintainers: Remember to use Squash-Merge

Signed-off-by: Michael Carroll <[email protected]>
@chapulina chapulina added the tests Broken or missing tests / testing infra label Dec 1, 2021
@mjcarroll mjcarroll self-assigned this Dec 2, 2021
src/Helpers_TEST.cc Outdated Show resolved Hide resolved
@mjcarroll
Copy link
Contributor Author

@osrf-jenkins retest this please

@mjcarroll mjcarroll merged commit 931d058 into main Dec 9, 2021
@mjcarroll mjcarroll deleted the pair_test_speedup branch December 9, 2021 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Broken or missing tests / testing infra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants