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

chore: Parallelize Tests #73

Merged
merged 3 commits into from
Aug 5, 2023
Merged

Conversation

rahulsom
Copy link
Contributor

This will use all available cores to run tests, and parallelize by all - suite/class/method. On machines with multiple cores, this will vastly improve test performance. These times are on my M1 MBP with 10 (8P + 2E) cores. They were reported by maven on running mvn verify.

I first ran mvn verify and ignored the time.
Then I ran it thrice without this change, and thrice with this change.

All times in seconds.

Run 1 Run 2 Run 3 Average
Before 21 21 22 21
After 16 16 16 16
Savings 5
% 24

Testing done

All existing tests pass

Submitter checklist

Preview Give feedback

Name From Git-Plugin-Test and others added 3 commits July 16, 2023 20:02
This will use all available cores to run tests, and parallelize by all - suite/class/method.
On machines with multiple cores, this will vastly improve test performance.
These times are on my M1 MBP with 10 (8P + 2E) cores. They were reported by maven on running `mvn verify`.

I first ran `mvn verify` and ignored the time.
Then I ran it thrice without this change, and thrice with this change.

All times in seconds.

|        | Run 1 | Run 2 | Run 3 | Average |
| ------ | ----: | ----: | ----: | ------: |
| Before |    21 |    21 |    22 |      21 |
| After  |    16 |    16 |    16 |      16 |
| Savings|       |       |       |       5 |
| %      |       |       |       |      24 |
Forcing the forkCount setting in the plugin pom will override the
value that a developer might set on their local computer based on the
configuration of that computer.

The configuration on ci.jenkins.io is known to have enough memory for
a JVM per core.  Use JVM per core on ci.jenkins.io for faster testing
and reduced costs.
@MarkEWaite MarkEWaite enabled auto-merge (squash) August 5, 2023 14:46
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Thanks for the idea to run tests in parallel. Implementation has changed based on recommendation from @jtnord.

@MarkEWaite MarkEWaite merged commit aa8b48e into jenkinsci:master Aug 5, 2023
@MarkEWaite MarkEWaite added the chore Maintenance label Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants