mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-14 01:46:18 -07:00
refactor(debug)
This commit is contained in:
parent
210c7b4bdc
commit
56dc7cc98d
1 changed files with 2 additions and 2 deletions
4
debug.go
4
debug.go
|
|
@ -15,7 +15,7 @@ func PrintMemoryStats() {
|
||||||
log := Debug("memory")
|
log := Debug("memory")
|
||||||
mem := memoryStats()
|
mem := memoryStats()
|
||||||
|
|
||||||
log("\u001b[33m---- Memory Dump Stats ----\u001b[39m")
|
log("\u001b[33m---- Memory Stats ----\u001b[39m")
|
||||||
log("Allocated: %s", humanize.Bytes(mem.Alloc))
|
log("Allocated: %s", humanize.Bytes(mem.Alloc))
|
||||||
log("Total Allocated: %s", humanize.Bytes(mem.TotalAlloc))
|
log("Total Allocated: %s", humanize.Bytes(mem.TotalAlloc))
|
||||||
log("Memory Allocations: %d", mem.Mallocs)
|
log("Memory Allocations: %d", mem.Mallocs)
|
||||||
|
|
@ -32,7 +32,7 @@ func PrintMemoryStats() {
|
||||||
log("Stack Cache In Use: %s", humanize.Bytes(mem.MCacheInuse))
|
log("Stack Cache In Use: %s", humanize.Bytes(mem.MCacheInuse))
|
||||||
log("Next GC cycle: %s", humanizeNano(mem.NextGC))
|
log("Next GC cycle: %s", humanizeNano(mem.NextGC))
|
||||||
log("Last GC cycle: %s", humanize.Time(time.Unix(0, int64(mem.LastGC))))
|
log("Last GC cycle: %s", humanize.Time(time.Unix(0, int64(mem.LastGC))))
|
||||||
log("\u001b[33m---- End Memory Dump ----\u001b[39m")
|
log("\u001b[33m---- Memory Stats ----\u001b[39m")
|
||||||
}
|
}
|
||||||
|
|
||||||
func memoryStats() runtime.MemStats {
|
func memoryStats() runtime.MemStats {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue