Repository navigation
perf(ci): give one job to each analyzer when every processor has one - #291
Merged
Merged
Conversation
run_code_analysis.py runs one analyzer per processor at once. Each of them took its number of threads from the processor count, as if it ran alone. A caller's --jobs or --config is kept, and fewer analyzers than processors still choose for themselves. Refs #290
The rule on nine cases, then a run of the script with a stand-in analyzer on every processor. Refs #290
The inputs can split into fewer groups than there are processors: 55 inputs give 11 analyzers on 12 processors. Those analyzers keep choosing their own number of threads. Refs #290
…essor The entry said that the script runs one analyzer per processor by default. It runs at most one, and fewer when the inputs split into fewer groups. Refs #290
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/ci/run_code_analysis.pyruns up to one analyzer per processor at once. Each of them took its number of threads from the processor count, as if it ran alone. The script now gives--jobs=1to each analyzer when every processor already has one.Closes #290
Change
analyzer_jobs_args(in the script) adds--jobs=1to the analyzer arguments when the run has several analyzers and at least as many as the machine has processors.--jobsor--configthrough--analyzer-argkeeps its choice: a configuration file may setjobs, and a command-line--jobswould override it.ANALYZER_JOBS, and when the inputs split into fewer groups: 55 inputs give 11 analyzers on 12 processors.Measurements
See #290 for the tables (run 46435079896: 4 processors, 55 files, 4 repetitions, both analyzers with coretrace-compiler v0.13.0). The measured command line is the one the script now builds.
--jobs=1, and a peak 506 MiB (27 %) and 560 MiB (29 %) lower. Next to main as it is, the time is the same within 1.2 % and the peak 328 MiB and 90 MiB lower.Tests
check_ci_script_analyzer_jobs(run_test.py): the rule on nine cases (analyzers against processors,--jobsand--configin both forms), then a run of the script with a stand-in analyzer on every processor, which must get--jobs=1, or the caller's--jobs=3.CI at 944de46
All ... passed.line.--jobs=1: 55 files, errors=0, warnings=10, infos=62, as in the measured runs. The script does not print its command lines: the arguments are those the new check reads from a stand-in analyzer.latestimage and runs the script inside it, not this branch's. The action and consumer jobs run this script on one file, hence one analyzer and no--jobs=1.Limits
One runner, one corpus, the
fastprofile. Not measured: fewer analyzers than processors, Docker, more than 4 processors.