-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Run multiple cargo tasks in parallel #39
Comments
@dmoka the code in my |
Sorry, I had a hectic last week and could not find time for this! I just see that it is merged, if you still need to test it, let me know, happy to do that. |
No problem! It's in the new 1.1.0 release, give it a try and let me know. |
Just tested, works like charm, great job! Also read the corresponding docs. It will help a lot performance-wise to produce more mutants and running tests against them. In the doc you say that we can set the |
It's more of an indicative number than a rigorous limit. You could set it to the number of threads or even higher. But given that most of the jobs it runs will at least some of the time produce some internal concurrency, I suspect there will usually be diminishing returns in going higher than the number of cores, and more risk that you run out of memory or start thrashing... I suppose you can imagine a project with a dominant very-long-running single-threaded memory-intensive test that uses exactly one CPU thread for most of the time and that would scale very well up to N_THREADS, on a machine that is unconstrained by RAM. It seems possible but unusual. But, I'd be interested to hear what you find, on your tree and your machine... |
Although cargo and the test framework try to use many cores, they often go through phases of being single-threaded.
The overall mutation tests would go faster if we ran multiple cargo builds in parallel.
Conceivably up to NCPUs builds could be run in parallel. But on some machines that might cause thrashing or too much memory pressure. Possibly we should also look at available memory. There should at least be an option to limit it. As a starting point perhaps NCPUs/2 is reasonable.
This requires making multiple scratch directories. However, we should not make more than the number of discovered mutants.
CargoTask
with apoll
method--jobs, -j
and thread it through.lab
code:-j2
works.Mutant::unapply
.Deferred until later:
The text was updated successfully, but these errors were encountered: