Skip to content

Commit

Permalink
Allow mvn verify load factor to be configured at the command line (#…
Browse files Browse the repository at this point in the history
…3852)

Currently, if you run `mvn verify` you get the moral equivalent of `make
-j$(nproc)`; this isn't always desirable in CI where we might want a
smaller load factor to reduce contention on a machine.

This PR allows you to pass an option:
```
mvn verify -DcoreFactor=FACTOR
```
to set the number of cores used to the nearest positive integer to
`$(nproc) / FACTOR`.

Co-authored-by: rv-jenkins <[email protected]>
  • Loading branch information
Baltoli and rv-jenkins authored Jan 24, 2024
1 parent 74bded8 commit 97b1a3a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions k-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<properties>
<config>tests/config.xml</config>
<ktestDir>${project.basedir}</ktestDir>
<coreFactor>1</coreFactor>
</properties>

<dependencies>
Expand Down Expand Up @@ -56,6 +57,9 @@
<goals>
<goal>cpu-count</goal>
</goals>
<configuration>
<factor>${coreFactor}</factor>
</configuration>
</execution>
</executions>
</plugin>
Expand Down

0 comments on commit 97b1a3a

Please sign in to comment.