Skip to content

When running with CTest, don't register all tests. #883

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

Merged
merged 8 commits into from
Dec 3, 2021

Conversation

vector-of-bool
Copy link
Contributor

Only register tests that match the name of the expression. This logic is
still somewhat fuzzy, but provides significant speedup in the common
case.

This reduces test startup overhead for an individual run from ~100ms
to <10ms.

Before:

~/D/d/m/cmake-build> time ctest -R bson/ -C Debug -j10 -Q
32.97user 4.78system 0:06.57elapsed 574%CPU (0avgtext+0avgdata 62128maxresident)k
0inputs+672outputs (0major+450824minor)pagefaults 0swaps

After:

~/D/d/m/cmake-build> time ctest -R bson/ -C Debug -j10 -Q
1.61user 0.44system 0:00.55elapsed 373%CPU (0avgtext+0avgdata 58548maxresident)k
0inputs+664outputs (0major+186847minor)pagefaults 0swaps

Only register tests that match the name of the expression. This logic is
still somewhat fuzzy, but provides significant speedup in the common
case.
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ctest speedup is great. Changes look good with a fix to new failing tests. I commented with a possible cause.

Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants