-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-37707: Exclude expensive unit tests from PGO task #15009
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
Conversation
Mark some individual tests to skip when --pgo is used. The tests marked increase the PGO task time significantly and likely don't help improve optimization of the final executable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Such a pgo skip decorator approach is exactly what I was thinking of recommending when you brought this up. :)
I haven't looked through exactly what these tests do, but I'd say it's worth evaluating ("guessing") whether they represent a common scenario or not. Even if they run for a long time, if it's something that's going to run a lot in user code then I'd rather keep it in. 99% of realistic Python runtime ("evaluated"/"guessed") is success cases, but a lot of the quick tests in the suite are going to exercise setup/teardown and failure paths. Let's not over-focus on those for the sake of a quick PGO run. |
I intended that --pgo will give you an optimized build without too much extra build time. Before PR #14702, the PGO builds took so long that in practice it seems that many did not bother to use them. If you don't care at all about long build time, then --pgo-extended is the option for that. If we make expensive tests run in the --pgo case, I don't see the point of --pgo-extended. Something I was thinking about previously, --pgo-extended should not not skip the tests marked with @skip_if_pgo_task. That way, people who want the most extensive code coverage can still use --pgo-extended to get the old behavior. |
Here is a comparison of test run time before and after my skip decorator.
|
I did two PGO builds with and without this PR and
+1 |
Thanks @nascheme for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
GH-15024 is a backport of this pull request to the 3.8 branch. |
Mark some individual tests to skip when --pgo is used. The tests marked increase the PGO task time significantly and likely don't help improve optimization of the final executable. (cherry picked from commit 52a48e6) Co-authored-by: Neil Schemenauer <[email protected]>
) Mark some individual tests to skip when --pgo is used. The tests marked increase the PGO task time significantly and likely don't help improve optimization of the final executable. (cherry picked from commit 52a48e6) Co-authored-by: Neil Schemenauer <[email protected]>
Mark some individual tests to skip when --pgo is used. The tests marked increase the PGO task time significantly and likely don't help improve optimization of the final executable.
Mark some individual tests to skip when --pgo is used. The tests marked increase the PGO task time significantly and likely don't help improve optimization of the final executable.
Mark some individual tests to skip when --pgo is used. The tests marked increase the PGO task time significantly and likely don't help improve optimization of the final executable.
Mark some individual tests to skip when --pgo is used. The tests
marked increase the PGO task time significantly and likely don't
help improve optimization of the final executable.
Marked tests:
https://bugs.python.org/issue37707