diff --git a/go/mirko/mirko.go b/go/mirko/mirko.go
index 78dbda1a..f4c45eb0 100644
--- a/go/mirko/mirko.go
+++ b/go/mirko/mirko.go
@@ -6,6 +6,7 @@ import (
"fmt"
"net"
"net/http"
+ "net/http/pprof"
"os"
"os/signal"
"sort"
@@ -103,6 +104,13 @@ func (m *Mirko) Listen() error {
})
m.httpMux.HandleFunc("/debug/requests", trace.Traces)
+ // pprof endpoints
+ m.httpMux.HandleFunc("/debug/pprof/", pprof.Index)
+ m.httpMux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
+ m.httpMux.HandleFunc("/debug/pprof/profile", pprof.Profile)
+ m.httpMux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
+ m.httpMux.HandleFunc("/debug/pprof/trace", pprof.Trace)
+
// -z legacy URLs
m.httpMux.HandleFunc("/statusz", func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/debug/status", http.StatusSeeOther)
@@ -113,6 +121,9 @@ func (m *Mirko) Listen() error {
m.httpMux.HandleFunc("/requestz", func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/debug/requests", http.StatusSeeOther)
})
+ m.httpMux.HandleFunc("/profilez", func(w http.ResponseWriter, r *http.Request) {
+ http.Redirect(w, r, "/debug/pprof", http.StatusSeeOther)
+ })
// root redirect
m.httpMux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
diff --git a/go/statusz/statusz.go b/go/statusz/statusz.go
index 20d51510..84f7f92b 100644
--- a/go/statusz/statusz.go
+++ b/go/statusz/statusz.go
@@ -118,7 +118,8 @@ SHA256 {{.BinaryHash}}
Running as {{.Username}} on {{.Hostname}}
Load {{.LoadAvg}}
View status,
- requests
+ requests,
+ profile