Skip to content

Instantly share code, notes, and snippets.

@rdumont
Created July 22, 2019 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdumont/1ee72907e0b8cc9a8e427d6a8c5587cb to your computer and use it in GitHub Desktop.
Save rdumont/1ee72907e0b8cc9a8e427d6a8c5587cb to your computer and use it in GitHub Desktop.
Profile Go micro-services in Kubernetes with pprof
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