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

πŸš€ πŸš€ πŸš€ πŸš€ βœ… πŸ— Run unit tests in parallel for 4x performance #35094

Closed
wants to merge 1 commit into from

Conversation

rileyajones
Copy link
Contributor

@rileyajones rileyajones commented Jun 30, 2021

Why Start With the Unit Tests?

While unit tests do not block job completion, they are our longest running and most credit consuming test type.
image

At the efforts to moment dramatically reducing the runtime of the e2e tests could actually be bottlenecked by the performance of of the Unit Tests. For example in the below image if the End-to-End Tests runtime were cut in 1/4 the Nomodule Build -> End-To-End Tests flow would take approximately 14 minutes and complete prior to the Unit Tests and Bundle Size check completing.
image

Performance to Be Gained

The job runs on a "Large Linux Machine" which has 4 cores, however, we do not take advantage of this fact by run tests synchronously.
image

By having the main test job fork itself and run a configurable amount of jobs in parallel we SHOULD be able to speed up the test runtime by approximately 4x (the number of cores is a good starting point though we may be able to gain even greater performance).

2 Workers

image

Moving Forward

If this experiment is a success the process will be replicated to work with the e2e and integration tests.

@samouri
Copy link
Member

samouri commented Jul 29, 2021

i appreciate that there were exactly 4 πŸš€ s

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.

None yet

2 participants