change default value of --process to (number of CPUs)-1 - #4104
Conversation
cc8c78b to
4ded913
Compare
|
I believe the tests failures on MacOS is not relevant to this code. |
There was a problem hiding this comment.
@xsuchy Thanks++ for the PR.
Overall this sounds like a nice idea, to increase the number of CPUs by default.
It seems like we have an agreement to have this at n-1 from #2980, and this sounds mostly fine to me, although n-2 could have been safer when users might have multiple other things open/in use if they are running scancode in their personal computers. But everywhere else this sounds great, and folks can always reduce the default CPU if it creates problems.
Not sure about the test failures, could you merge latest develop just to be sure?
@pombredanne please review this too.
Related: aboutcode-org#2980 Signed-off-by: Miroslav Suchý <msuchy@redhat.com>
|
Rebased on top of develop branch. |
|
Thanks++ @xsuchy, this is a great addition! Merging. |
licenses timings re-measured on main after #42 and #43: cargo 0.91 -> 0.85 s, self 0.77 -> 0.74 s, RSS within noise. scancode figures unchanged. The -n default changed to N-1 in scancode-toolkit 32.4.0 (aboutcode-org/scancode-toolkit#4104), not 32.5.0.
* Add ScanCode comparison to README and benchmarking docs Numbers measured against scancode-toolkit 32.5.0 on rust-lang/cargo at a07c49a on an 8-core M1 Pro. Reproduction steps and the aggregate-RSS sampling method are in docs/benchmarking.md. * Refresh figures for 0da4c8b and correct -n default attribution licenses timings re-measured on main after #42 and #43: cargo 0.91 -> 0.85 s, self 0.77 -> 0.74 s, RSS within noise. scancode figures unchanged. The -n default changed to N-1 in scancode-toolkit 32.4.0 (aboutcode-org/scancode-toolkit#4104), not 32.5.0. * Note exit 2 behaviour in ScanCode comparison instructions Repositories with unparseable manifests, including deliberately-invalid test fixtures, produce per-file errors and a non-zero exit without affecting the timing or RSS being measured.
Related: #2980
Tasks
Run tests locally to check for errors.
Test suite fails to run for me, but the script run correctly.