Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --concurrency flag #37

Merged
merged 5 commits into from Mar 11, 2022
Merged

Add --concurrency flag #37

merged 5 commits into from Mar 11, 2022

Conversation

jopemachine
Copy link
Contributor

@jopemachine jopemachine commented Mar 10, 2022

Fixes #21.

I'm not sure I need to write test codes about this flag, so I tried to simply benchmark the option using hyperfine.

os.cpus().length on my local computer is 16.

Here are the benchmark results.

$ hyperfine --runs 10 'node ./cli.js ./node_modules ./abc_node_modules' > result1
Benchmark 1: node ./cli.js ./node_modules ./abc_node_modules
  Time (mean ± σ):      5.029 s ±  0.919 s    [User: 5.521 s, System: 5.258 s]
  Range (min … max):    3.665 s …  6.315 s    10 runs
$ hyperfine --runs 10 'node ./cli.js ./node_modules ./abc_node_modules --concurrency=4' > result2
Benchmark 1: node ./cli.js ./node_modules ./abc_node_modules --concurrency=4
  Time (mean ± σ):      5.739 s ±  1.223 s    [User: 6.431 s, System: 5.027 s]
  Range (min … max):    4.451 s …  7.475 s    10 runs

If I need to do other things, I appreciate your letting me know.

@sindresorhus sindresorhus changed the title Add support for concurrency option Add --concurrency flag Mar 11, 2022
@sindresorhus sindresorhus merged commit 8726315 into sindresorhus:main Mar 11, 2022
@sindresorhus
Copy link
Owner

Looks good. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for concurrency option
2 participants