💻 Tech
Go’s runtime
package allows us to check metrics such as memory. For example, Alloc
below shows the current memory usage of heap objects.
var m runtime.MemStats
runtime.ReadMemStats(&m)
fmt.Printf("%v", m.Alloc)
Go’s runtime
package allows us to check metrics such as memory. For example, Alloc
below shows the current memory usage of heap objects.
var m runtime.MemStats
runtime.ReadMemStats(&m)
fmt.Printf("%v", m.Alloc)