add gomaxprocs

This commit is contained in:
YouROK
2021-11-11 20:42:08 +03:00
parent e120745559
commit e5b7079d93

View File

@@ -41,6 +41,8 @@ func (args) Version() string {
var params args var params args
func main() { func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
arg.MustParse(&params) arg.MustParse(&params)
if params.Path == "" { if params.Path == "" {
@@ -56,6 +58,7 @@ func main() {
log.Init(params.LogPath, params.WebLogPath) log.Init(params.LogPath, params.WebLogPath)
fmt.Println("=========== START ===========") fmt.Println("=========== START ===========")
fmt.Println("TorrServer", version.Version+",", runtime.Version()) fmt.Println("TorrServer", version.Version+",", runtime.Version())
fmt.Println("CPU Num:", runtime.NumCPU())
if params.HttpAuth { if params.HttpAuth {
log.TLogln("Use HTTP Auth file", settings.Path+"/accs.db") log.TLogln("Use HTTP Auth file", settings.Path+"/accs.db")
} }