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

Default concurrency is NumCPU, not 4 #23

Closed
ryboe opened this issue May 27, 2018 · 1 comment
Closed

Default concurrency is NumCPU, not 4 #23

ryboe opened this issue May 27, 2018 · 1 comment

Comments

@ryboe
Copy link
Contributor

ryboe commented May 27, 2018

I was confused by this section of the --help text. I wondered why concurrency was defaulting to 4, instead of using runtime.NumCPU() to scale the number of workers to the user's actual number of cores.

Flags:
  -j, --concurrency int           Concurrency (default 4)

Apparently, you are doing this 😀👍

rootCmd.PersistentFlags().IntVarP(&e.cfg.Run.Concurrency, "concurrency", "j", runtime.NumCPU(), "Concurrency")

https://github.com/golangci/golangci-lint/blob/master/pkg/commands/root.go#L64

I think the --help text should be updated to Concurrency (default NumCPU) or similar. Go programmers will recognize NumCPU as runtime.NumCPU().

@golangci
Copy link
Collaborator

@y0ssar1an thank you!
fixed in #27

golangci pushed a commit that referenced this issue May 28, 2018
…-text

#23: improve help text for --concurrency
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

No branches or pull requests

1 participant