Created
July 22, 2019 20:01
-
-
Save rdumont/1ee72907e0b8cc9a8e427d6a8c5587cb to your computer and use it in GitHub Desktop.
Profile Go micro-services in Kubernetes with pprof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net/http" | |
_ "net/http/pprof" | |
) | |
func main() { | |
http.HandleFunc("/", serveHTTP) | |
http.ListenAndServe(":8080", nil) | |
} | |
func serveHTTP(w http.ResponseWriter, r *http.Request) { | |
w.Write([]byte("Hello, world")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment