(buf *bytes.Buffer)
| 133 | } |
| 134 | |
| 135 | func (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 | |
| 156 | const ( |
| 157 | gcTimeFormat = "2006/01/02 15:04:05.000" |
no test coverage detected