Skip to content

Commit

Permalink
chore: Parallelize Tests (#197)
Browse files Browse the repository at this point in the history
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 |   876 |   873 |   878 |     876 |
| After  |   300 |   300 |   301 |     300 |
| Savings|       |       |       |     576 |
| %      |       |       |       |      66 |

Co-authored-by: Name From Git-Plugin-Test <email.from.git.plugin.test@example.com>
  • Loading branch information
rahulsom and Name From Git-Plugin-Test committed Jul 31, 2023
1 parent 599809d commit d689167
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
<compatibleSinceVersion>1.44</compatibleSinceVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkCount>1C</forkCount>
<parallel>all</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit d689167

Please sign in to comment.