mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
print out memory size
This commit is contained in:
parent
346541a101
commit
95ef4513c8
|
@ -82,7 +82,7 @@ func PrintMemUsage(totalRowCount uint64) {
|
||||||
var m runtime.MemStats
|
var m runtime.MemStats
|
||||||
runtime.ReadMemStats(&m)
|
runtime.ReadMemStats(&m)
|
||||||
// For info on each, see: https://golang.org/pkg/runtime/#MemStats
|
// For info on each, see: https://golang.org/pkg/runtime/#MemStats
|
||||||
fmt.Printf("Each %v Bytes", m.Alloc/totalRowCount)
|
fmt.Printf("Each %.2f Bytes", float64(m.TotalAlloc)/float64(totalRowCount))
|
||||||
fmt.Printf("\tAlloc = %v MiB", bToMb(m.Alloc))
|
fmt.Printf("\tAlloc = %v MiB", bToMb(m.Alloc))
|
||||||
fmt.Printf("\tTotalAlloc = %v MiB", bToMb(m.TotalAlloc))
|
fmt.Printf("\tTotalAlloc = %v MiB", bToMb(m.TotalAlloc))
|
||||||
fmt.Printf("\tSys = %v MiB", bToMb(m.Sys))
|
fmt.Printf("\tSys = %v MiB", bToMb(m.Sys))
|
||||||
|
|
Loading…
Reference in a new issue