Skip to content

Commit

Permalink
chore: Parallelize Tests
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 |    29 |    30 |    29 |      29 |
| After  |    17 |    17 |    17 |      17 |
| Savings|       |       |       |      12 |
| %      |       |       |       |      41 |
  • Loading branch information
Name From Git-Plugin-Test committed Jul 16, 2023
1 parent dfe58b2 commit ecc3847
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,18 @@
</dependency>

</dependencies>
<build>
<plugins>
<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>

</project>

0 comments on commit ecc3847

Please sign in to comment.