Closed cemiboou closed 1 month ago
Currently no there is not. Its based on the amount of CPU's the system reports.
Seems like something that could be useful to add in though.
As you have noticed you can control the number of of threads using GOMAXPROCS but I can see it being useful to tweak each one.
$scc -h
--file-list-queue-size int the size of the queue of files found and ready to be read into memory (default 8)
--file-process-job-workers int number of goroutine workers that process files collecting stats (default 8)
--file-summary-job-queue-size int the size of the queue used to hold processed file statistics before formatting (default 8)
--directory-walker-job-workers int controls the maximum number of workers which will walk the directory tree (default 8)
This is now sitting in master. You can now control each of the sizes however you wish as you can see above.
Hi,
for example :
my test
GOMAXPROCS=1 ~/opensource/scc/scc --by-file --no-cocomo --no-complexity json 3.96s user 7.59s system 30% cpu 37.680 total
GOMAXPROCS=16 ~/opensource/scc/scc --by-file --no-cocomo --no-complexity jso 3.76s user 7.16s system 91% cpu 11.933 total