change data

This commit is contained in:
Jay 2018-10-10 01:58:45 +08:00
parent 8880f145a9
commit 241bd42156

24
main.go
View File

@ -111,18 +111,18 @@ func PrintMemUsage() {
fmt.Printf("\t NextGC = %v MiB\n", bToMb(m.NextGC)) fmt.Printf("\t NextGC = %v MiB\n", bToMb(m.NextGC))
obj := map[string]interface{}{ obj := map[string]interface{}{
"Alloc": fmt.Sprintf("%v MiB", bToMb(m.Alloc)), "Alloc": m.Alloc,
"Sys": fmt.Sprintf("%v MiB", bToMb(m.Sys)), "Sys": m.Sys,
"HeapAlloc": fmt.Sprintf("%v MiB", bToMb(m.HeapAlloc)), "HeapAlloc": m.HeapAlloc,
"HeapSys": fmt.Sprintf("%v MiB", bToMb(m.HeapSys)), "HeapSys": m.HeapSys,
"HeapIdle": fmt.Sprintf("%v MiB", bToMb(m.HeapIdle)), "HeapIdle": m.HeapIdle,
"HeapInuse": fmt.Sprintf("%v MiB", bToMb(m.HeapInuse)), "HeapInuse": m.HeapInuse,
"HeapReleased": fmt.Sprintf("%v MiB", bToMb(m.HeapReleased)), "HeapReleased": m.HeapReleased,
"StackInuse": fmt.Sprintf("%v MiB", bToMb(m.StackInuse)), "StackInuse": m.StackInuse,
"StackSys": fmt.Sprintf("%v MiB", bToMb(m.StackSys)), "StackSys": m.StackSys,
"GCSys": fmt.Sprintf("%v MiB", bToMb(m.GCSys)), "GCSys": m.GCSys,
"NextGC": fmt.Sprintf("%v MiB", bToMb(m.NextGC)), "NextGC": m.NextGC,
"NumGC": fmt.Sprintf("%v", m.NumGC), "NumGC": m.NumGC,
} }
es.PutLog("memory", obj) es.PutLog("memory", obj)