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

Add parallel test processing #334

Merged

Conversation

tothszabi
Copy link
Contributor

@tothszabi tothszabi commented Sep 28, 2023

Closes #333

This PR adds parallel test processing by utilising a simple OperationQueue.

The concurrent operation count is set twice the time of the available CPU cores. As far as I know the OperationQueue has some internal max limits and so it is not too much of a problem if we set a higher value.

Also the the final array has to be sorted because of the order will be random for every html generation because of the multithreading.

@sonarcloud
Copy link

sonarcloud bot commented Sep 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication


operationQueue.waitUntilAllOperationsAreFinished()

testSummaries = summaries.sorted { $0.testName < $1.testName }
Copy link
Member

Choose a reason for hiding this comment

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

Do you know if this is significantly different from today's behavior? More just to determine if the next release should denote this as a breaking change.

@tylervick
Copy link
Member

Thank you for the contribution! Just one minor question

@justinshapiro
Copy link

@tothszabi Thanks for addressing this! I noticed this problem on my side as well. Any updates on getting this merged in?

@tylervick
Copy link
Member

I'll look into getting this merged - CI actions are broken due to a regression on GitHub's macOS hosted runners after Ventura. I'll verify the change locally and merge this in later on today if all looks good.

@tylervick tylervick merged commit afd51b7 into XCTestHTMLReport:main Nov 13, 2023
2 of 6 checks passed
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.

Processing large test results takes too long
3 participants