From abef43e4df4ffffee844f676797b71bd1405f19d Mon Sep 17 00:00:00 2001
From: Travis Ralston <travpc@gmail.com>
Date: Sat, 26 Aug 2023 15:33:08 -0600
Subject: [PATCH] Bind pprof cpu profiles correctly

---
 api/_debug/pprof.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/_debug/pprof.go b/api/_debug/pprof.go
index bec689fb..f2942dc8 100644
--- a/api/_debug/pprof.go
+++ b/api/_debug/pprof.go
@@ -16,9 +16,9 @@ func BindPprofEndpoints(httpMux *httprouter.Router, secret string) {
 	httpMux.Handler("GET", "/_matrix/media/unstable/io.t2bot/debug/pprof/goroutine", pprofServe(pprof.Index, secret))
 	httpMux.Handler("GET", "/_matrix/media/unstable/io.t2bot/debug/pprof/heap", pprofServe(pprof.Index, secret))
 	httpMux.Handler("GET", "/_matrix/media/unstable/io.t2bot/debug/pprof/mutex", pprofServe(pprof.Index, secret))
-	httpMux.Handler("GET", "/_matrix/media/unstable/io.t2bot/debug/pprof/profile", pprofServe(pprof.Index, secret))
+	httpMux.Handler("GET", "/_matrix/media/unstable/io.t2bot/debug/pprof/profile", pprofServe(pprof.Profile, secret))
 	httpMux.Handler("GET", "/_matrix/media/unstable/io.t2bot/debug/pprof/threadcreate", pprofServe(pprof.Index, secret))
-	httpMux.Handler("GET", "/_matrix/media/unstable/io.t2bot/debug/pprof/trace", pprofServe(pprof.Index, secret))
+	httpMux.Handler("GET", "/_matrix/media/unstable/io.t2bot/debug/pprof/trace", pprofServe(pprof.Trace, secret))
 }
 
 type generatorFn = func(w http.ResponseWriter, r *http.Request)
-- 
GitLab