MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / dumpMem

Method dumpMem

server_info.go:135–154  ·  view source on GitHub ↗
(buf *bytes.Buffer)

Source from the content-addressed store, hash-verified

133}
134
135func (i *info) dumpMem(buf *bytes.Buffer) {
136 buf.WriteString("# Mem\r\n")
137
138 var mem runtime.MemStats
139 runtime.ReadMemStats(&mem)
140
141 i.dumpPairs(buf, infoPair{"mem_alloc", getMemoryHuman(mem.Alloc)},
142 infoPair{"mem_sys", getMemoryHuman(mem.Sys)},
143 infoPair{"mem_looksups", getMemoryHuman(mem.Lookups)},
144 infoPair{"mem_mallocs", getMemoryHuman(mem.Mallocs)},
145 infoPair{"mem_frees", getMemoryHuman(mem.Frees)},
146 infoPair{"mem_total", getMemoryHuman(mem.TotalAlloc)},
147 infoPair{"mem_heap_alloc", getMemoryHuman(mem.HeapAlloc)},
148 infoPair{"mem_heap_sys", getMemoryHuman(mem.HeapSys)},
149 infoPair{"mem_head_idle", getMemoryHuman(mem.HeapIdle)},
150 infoPair{"mem_head_inuse", getMemoryHuman(mem.HeapInuse)},
151 infoPair{"mem_head_released", getMemoryHuman(mem.HeapReleased)},
152 infoPair{"mem_head_objects", mem.HeapObjects},
153 )
154}
155
156const (
157 gcTimeFormat = "2006/01/02 15:04:05.000"

Callers 2

DumpMethod · 0.95
dumpAllMethod · 0.95

Calls 2

dumpPairsMethod · 0.95
getMemoryHumanFunction · 0.85

Tested by

no test coverage detected