cmd/relaysrv: Add number of routines

This commit is contained in:
Audrius Butkevicius 2016-02-10 21:24:57 +00:00 committed by Jakob Borg
parent b1205db7ac
commit 49170bf2d8

View File

@ -40,6 +40,7 @@ func getStatus(w http.ResponseWriter, r *http.Request) {
status["goOS"] = runtime.GOOS status["goOS"] = runtime.GOOS
status["goArch"] = runtime.GOARCH status["goArch"] = runtime.GOARCH
status["goMaxProcs"] = runtime.GOMAXPROCS(-1) status["goMaxProcs"] = runtime.GOMAXPROCS(-1)
status["goNumRoutine"] = runtime.NumGoroutine()
status["kbps10s1m5m15m30m60m"] = []int64{ status["kbps10s1m5m15m30m60m"] = []int64{
rc.rate(10/10) * 8 / 1000, rc.rate(10/10) * 8 / 1000,
rc.rate(60/10) * 8 / 1000, rc.rate(60/10) * 8 / 1000,