|
|
@ -16,6 +16,15 @@ $ ncpu
|
|
|
|
|
|
|
|
|
|
|
|
This will return an integer representing the number of available CPU cores.
|
|
|
|
This will return an integer representing the number of available CPU cores.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## install ncpu
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
**User go module:**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
$ go install github.com/OpenIMSDK/Open-IM-Server/tools/ncpu@latest
|
|
|
|
|
|
|
|
$ ncpu
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Example:
|
|
|
|
### Example:
|
|
|
|
|
|
|
|
|
|
|
|
Let's say you're compiling a project using `make`. To utilize all the CPU cores for the compilation process, you can use:
|
|
|
|
Let's say you're compiling a project using `make`. To utilize all the CPU cores for the compilation process, you can use:
|
|
|
@ -44,4 +53,4 @@ If you have any suggestions, bug reports, or wish to contribute to the developme
|
|
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
|
|
`ncpu` is released under the [LICENSE_NAME](LINK_TO_LICENSE). Please refer to the license file for more details.
|
|
|
|
`ncpu` is released under the [LICENSE_NAME](LINK_TO_LICENSE). Please refer to the license file for more details.
|
|
|
|