this repo has no description

knotserver/internal: setup pprof

Changed files
+4
cmd
knotserver
knotserver
+2
cmd/knotserver/main.go
··· 11 "github.com/sotangled/tangled/knotserver/db" 12 "github.com/sotangled/tangled/log" 13 "github.com/sotangled/tangled/rbac" 14 ) 15 16 func main() {
··· 11 "github.com/sotangled/tangled/knotserver/db" 12 "github.com/sotangled/tangled/log" 13 "github.com/sotangled/tangled/rbac" 14 + 15 + _ "net/http/pprof" 16 ) 17 18 func main() {
+2
knotserver/internal.go
··· 5 "net/http" 6 7 "github.com/go-chi/chi/v5" 8 "github.com/sotangled/tangled/knotserver/db" 9 "github.com/sotangled/tangled/rbac" 10 ) ··· 59 60 r.Get("/push-allowed", h.PushAllowed) 61 r.Get("/keys", h.InternalKeys) 62 63 return r 64 }
··· 5 "net/http" 6 7 "github.com/go-chi/chi/v5" 8 + "github.com/go-chi/chi/v5/middleware" 9 "github.com/sotangled/tangled/knotserver/db" 10 "github.com/sotangled/tangled/rbac" 11 ) ··· 60 61 r.Get("/push-allowed", h.PushAllowed) 62 r.Get("/keys", h.InternalKeys) 63 + r.Mount("/debug", middleware.Profiler()) 64 65 return r 66 }