Golang runtime/pprof.Profiles() function and Profile type example
package runtime/pprof
Golang runtime/pprof.Profiles() function and Profile type usage example
package main
import (
"fmt"
"runtime/pprof"
)
func main() {
profiles := pprof.Profiles()
for k, v := range profiles {
fmt.Println(k, v)
}
}
0 &{block {0 0} map[] 0x4550d0 0x455120}
1 &{goroutine {0 0} map[] 0x454a80 0x454ab0}
2 &{heap {0 0} map[] 0x452410 0x452460}
3 &{threadcreate {0 0} map[] 0x4549a0 0x4549f0}
Reference :
Advertisement
Something interesting
Tutorials
+17k Golang : How to save log messages to file?
+7.2k Golang : Use modern ciphers only in secure connection
+7.8k Golang : Load DSA public key from file example
+5.9k Golang : Detect variable or constant type
+19.3k Golang : Get RGBA values of each image pixel
+6.2k PHP : How to handle URI or URL with non-ASCII characters such as Chinese/Japanese/Korean(CJK) ?
+8.2k Prevent Write failed: Broken pipe problem during ssh session with screen command
+5.4k Golang : What is StructTag and how to get StructTag's value?
+10.9k Golang : Get UDP client IP address and differentiate clients by port number
+16.3k Golang : Find out mime type from bytes in buffer
+15.6k Golang : Force download file example