Commit 29e3fb9
committed
feat: allow for parallel execution of
When called with -jN for N>1, make will run `rebar -r eunit` for
all src/* Erlang apps (without the default skipped ones) up to the
limit of N times in parallel.
This is best used with GNU Make, as it allows for controlling the
output of each subtask to be grouped. BSD Make has no such feature
and interleaves all parallel target’s output, making it hard to
read.
For example:
gmake -j2 --output-sync=target
will run two test suites in parallel and keep their respective
outputs separated. It does this by buffering all output before a
task is done that means for the first few tests, you don’t see
output as you do with serial execution.
On my machine I can run up to -j6 relatively stable, making use
of all 14 cores. Beyond that, Spurious errors can occur. I’ll
file those separately.
-j2 shows an almost 2x speed improvement, as expected and things
scale relatively linarly up until ~2.5 minutes of runtime, which
seems to be a lower bound with all our various setup and wait
bits.
For comparison, -j1, that is serial execution takes about 10.5
minutes on this machine.
Use with care in CI, but definitely use on your local dev machine.make eunit sub-targets1 parent 137df0e commit 29e3fb9
1 file changed
Lines changed: 19 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
177 | 189 | | |
| 190 | + | |
178 | 191 | | |
179 | 192 | | |
180 | 193 | | |
181 | 194 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 195 | + | |
187 | 196 | | |
| 197 | + | |
| 198 | + | |
188 | 199 | | |
189 | 200 | | |
190 | 201 | | |
| |||
0 commit comments