From b102a977b8578117c93a5768ad145ce04b3a88f9 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Sat, 16 Jan 2016 12:57:43 -0800 Subject: [PATCH] Loop in the http.DefaultServeMux for pprof. --- app/router.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/router.go b/app/router.go index 13dcc9155..db6e7ce36 100644 --- a/app/router.go +++ b/app/router.go @@ -84,6 +84,9 @@ func TopologyHandler(c Reporter, preRoutes *mux.Router, postRoutes http.Handler) topologyRegistry.captureRenderer(c, handleWs)) // NB not gzip! get.HandleFunc("/api/report", gzipHandler(makeRawReportHandler(c))) + // We pull in the http.DefaultServeMux to get the pprof routes + preRoutes.PathPrefix("/debug/pprof").Handler(http.DefaultServeMux) + if postRoutes != nil { preRoutes.PathPrefix("/").Handler(postRoutes) }