aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@uber.com>2019-03-13 23:14:40 -0700
committerChris Lu <chris.lu@uber.com>2019-03-13 23:14:40 -0700
commit95ef4513c88ee2399f5edb89db9080e18830ef4e (patch)
treedfe611a5e632d6abca382d1bc57457bb9fa182d5
parent346541a101a06b24b7630e58cdb07353c1c0904c (diff)
downloadseaweedfs-95ef4513c88ee2399f5edb89db9080e18830ef4e.tar.xz
seaweedfs-95ef4513c88ee2399f5edb89db9080e18830ef4e.zip
print out memory size
-rw-r--r--weed/storage/needle/compact_map_perf_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/needle/compact_map_perf_test.go b/weed/storage/needle/compact_map_perf_test.go
index bb538bf7f..908da968f 100644
--- a/weed/storage/needle/compact_map_perf_test.go
+++ b/weed/storage/needle/compact_map_perf_test.go
@@ -82,7 +82,7 @@ func PrintMemUsage(totalRowCount uint64) {
var m runtime.MemStats
runtime.ReadMemStats(&m)
// 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("\tTotalAlloc = %v MiB", bToMb(m.TotalAlloc))
fmt.Printf("\tSys = %v MiB", bToMb(m.Sys))