Skip to content

Commit

Permalink
fix: limit default concurrency to 10
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Apr 5, 2024
1 parent aa6602c commit e3de101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/program.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ program.postParse = async () => {

// c = 2, when lighthouse or screenshot -> c = 1
if (program.concurrency === undefined) {
program.concurrency = getConfigVal('concurrency', os.cpus().length);
program.concurrency = getConfigVal('concurrency', Math.min(10, os.cpus().length));
if (config.maxConcurrency && program.concurrency > config.maxConcurrency) {
program.concurrency = config.maxConcurrency;
}
Expand Down Expand Up @@ -172,7 +172,7 @@ program.option('-u --urls <urls>', 'Comma separated url list for scan', list).
option('-d, --max-depth <depth>', 'Max scan depth',
getConfigVal('maxDepth', 10)).
option('-c, --concurrency <threads>',
'Threads number (default: by cpu cores)').
`Threads number (default: ${Math.min(10, os.cpus().length)})`).
option('--lighthouse', 'Appends base Lighthouse fields to preset').
option('--delay <ms>', 'Delay between requests', parseInt, 0).
option('-f, --fields <json>',
Expand Down

0 comments on commit e3de101

Please sign in to comment.