Skip to content

Speed up Helpers::Pair test#295

Merged
mjcarroll merged 4 commits intomainfrom
pair_test_speedup
Dec 9, 2021
Merged

Speed up Helpers::Pair test#295
mjcarroll merged 4 commits intomainfrom
pair_test_speedup

Conversation

@mjcarroll
Copy link
Copy Markdown

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 michael@openrobotics.org

Note to maintainers: Remember to use Squash-Merge

@mjcarroll mjcarroll requested a review from scpeters as a code owner November 30, 2021 20:02
Signed-off-by: Michael Carroll <michael@openrobotics.org>
@chapulina chapulina added the tests Broken or missing tests / testing infra label Dec 1, 2021
@mjcarroll mjcarroll self-assigned this Dec 2, 2021
Michael Carroll added 2 commits December 9, 2021 11:23
Signed-off-by: Michael Carroll <michael@openrobotics.org>
@mjcarroll
Copy link
Copy Markdown
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.

5 participants