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

Fix performance of System.Security. Cryptography.Tests #95284

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

vcsjones
Copy link
Member

@vcsjones vcsjones commented Nov 27, 2023

This moves the RSA 16384 tests to outerloop. These tests take a significant amount of time on Linux due to primality tests of RSA 16384. These six tests were accounting for over half the time of test suite on my machine.

This also significantly improves the inner-loop dev experience as test discovery is near-instant now instead of taking dozens of seconds.

This also impacted the RSAOpenSsl tests on macOS.

BEFORE ./dotnet.sh test src/libraries/System.Security.Cryptography/tests 696.78s user 9.53s system 342% cpu 3:25.93 total
AFTER ./dotnet.sh test src/libraries/System.Security.Cryptography/tests 491.88s user 8.50s system 643% cpu 1:23.73 total

Fixes #94436
Fixes #93840

These tests take a significant amount of time on Linux due to primality tests of RSA 16384.
@vcsjones vcsjones added area-System.Security test-enhancement Improvements of test source code labels Nov 27, 2023
@ghost
Copy link

ghost commented Nov 27, 2023

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

Issue Details

This moves the RSA 16384 tests to outerloop. These tests take a significant amount of time on Linux due to primality tests of RSA 16384. These six tests were accounting for over half the time of test suite on my machine.

This also significantly improves the inner-loop dev experience as test discovery is near-instant now instead of taking dozens of seconds.

BEFORE ./dotnet.sh test src/libraries/System.Security.Cryptography/tests 696.78s user 9.53s system 342% cpu 3:25.93 total
AFTER ./dotnet.sh test src/libraries/System.Security.Cryptography/tests 491.88s user 8.50s system 643% cpu 1:23.73 total

Fixes #94436
Fixes #93840

Author: vcsjones
Assignees: -
Labels:

area-System.Security, test-enhancement

Milestone: -

@ghost ghost assigned vcsjones Nov 27, 2023
@vcsjones vcsjones changed the title Fix performance of System.Security.Cryptopgrahy.Tests Fix performance of System.Security. Cryptography.Tests Nov 27, 2023
@bartonjs bartonjs merged commit a56efef into dotnet:main Nov 27, 2023
109 checks passed
@vcsjones vcsjones deleted the ssc-crypto-test-perf branch November 27, 2023 22:33
@vcsjones
Copy link
Member Author

/backport to release/8.0-staging

Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/7014231902

@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Security test-enhancement Improvements of test source code
Projects
None yet
2 participants