Run saltcheck tests in parallel#56097
Conversation
|
re-run pr-windows2016-py3 |
|
re-run pr-pre-commit |
dwoz
left a comment
There was a problem hiding this comment.
@mchugh19 I'm not a fan of overloading the meaning of config values or allowing them to have multiple types. I'd prefer that saltcheck_parallel remain a boolean and use a second config value for the number of potential processes, that value can default to number of available processes.
Sure. That's easy enough. Maybe you could look over #56101 first, since either will need to be rebased after the other one is merged anyway. |
|
@dwoz as suggested, another |
What does this PR do?
Adds multiprocessing capability to saltcheck. I'm not sure if this is worth the additional complexity or if this is the way the core-team would like multiprocessing supported. Thoughts?
Tests will be run in parallel by adding
saltcheck_parallel: Truein minion config.Setting this value to an integer will set the maximum parallel processes.
For each state, tests are multiprocessed batched by
Optional value set in
saltcheck_parallelor
The minimum between the number of processors or the number of tests for the state
Previous Behavior
Given tests
and
saltcheck processing runs sequentially
26 seconds of sleep completes in 31 seconds total
New Behavior
Same tests now finish faster
Same 26 seconds of sleep completes in 17 seconds (individual test duration time is no longer very accurate as it includes multiprocessing overhead and since many tests run in parallel, the sum into execution time is even more off (especially for a series of short tests))
Adjusting the sleeps to larger values totaling 59 seconds, completes in 30 seconds
Tests written?
No
Not sure how to write a test as the output is unchanged. Is it possible to write assertions against the debug log?
Commits signed with GPG?
No