aboutsummaryrefslogtreecommitdiff
path: root/go/stats/memory.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/stats/memory.go')
-rw-r--r--go/stats/memory.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/go/stats/memory.go b/go/stats/memory.go
deleted file mode 100644
index 0700d92de..000000000
--- a/go/stats/memory.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package stats
-
-import (
- "runtime"
-)
-
-type MemStatus struct {
- Goroutines int
- All uint64
- Used uint64
- Free uint64
- Self uint64
- Heap uint64
- Stack uint64
-}
-
-func MemStat() MemStatus {
- mem := MemStatus{}
- mem.Goroutines = runtime.NumGoroutine()
- memStat := new(runtime.MemStats)
- runtime.ReadMemStats(memStat)
- mem.Self = memStat.Alloc
- mem.Heap = memStat.HeapAlloc
- mem.Stack = memStat.StackInuse
-
- mem.fillInStatus()
- return mem
-}