📀 Cores should be Threads

pull/632/head
Fenny 2020-07-18 00:47:18 +02:00
parent c84ae11e26
commit 35fdd375cd
1 changed files with 10 additions and 10 deletions

20
app.go
View File

@ -679,12 +679,12 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
host, port := parseAddr(addr) host, port := parseAddr(addr)
var ( var (
tlsStr = "FALSE" tlsStr = "FALSE"
routesLen = len(app.Routes()) routesLen = len(app.Routes())
osName = utils.ToUpper(runtime.GOOS) osName = utils.ToUpper(runtime.GOOS)
memTotal = utils.ByteSize(utils.MemoryTotal()) memTotal = utils.ByteSize(utils.MemoryTotal())
cpuCores = runtime.NumCPU() cpuThreads = runtime.NumCPU()
pid = os.Getpid() pid = os.Getpid()
) )
if host == "" { if host == "" {
host = "0.0.0.0" host = "0.0.0.0"
@ -708,10 +708,10 @@ func (app *App) startupMessage(addr string, tls bool, pids string) {
} }
// Build startup banner // Build startup banner
fmt.Fprintf(out, logo, cBlack, cBlack, fmt.Fprintf(out, logo, cBlack, cBlack,
cCyan, cBlack, fmt.Sprintf(" HOST %s\tOS %s", cyan(host), cyan(osName)), cCyan, cBlack, fmt.Sprintf(" HOST %s\tOS %s", cyan(host), cyan(osName)),
cCyan, cBlack, fmt.Sprintf(" PORT %s\tCORES %s", cyan(port), cyan(cpuCores)), cCyan, cBlack, fmt.Sprintf(" PORT %s\tTHREADS %s", cyan(port), cyan(cpuThreads)),
cCyan, cBlack, fmt.Sprintf(" TLS %s\tMEM %s", cyan(tlsStr), cyan(memTotal)), cCyan, cBlack, fmt.Sprintf(" TLS %s\tMEM %s", cyan(tlsStr), cyan(memTotal)),
cBlack, cyan(Version), fmt.Sprintf(" ROUTES %s\t\t\t PID %s%s%s\n", cyan(routesLen), cyan(pid), pids, cReset), cBlack, cyan(Version), fmt.Sprintf(" ROUTES %s\t\t\t PID %s%s%s\n", cyan(routesLen), cyan(pid), pids, cReset),
) )
// Write to io.write // Write to io.write
_ = out.Flush() _ = out.Flush()