forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

knotserver/internal: setup pprof

Changed files
+4
cmd
knotserver
knotserver
+2
cmd/knotserver/main.go
···
"github.com/sotangled/tangled/knotserver/db"
"github.com/sotangled/tangled/log"
"github.com/sotangled/tangled/rbac"
+
+
_ "net/http/pprof"
)
func main() {
+2
knotserver/internal.go
···
"net/http"
"github.com/go-chi/chi/v5"
+
"github.com/go-chi/chi/v5/middleware"
"github.com/sotangled/tangled/knotserver/db"
"github.com/sotangled/tangled/rbac"
)
···
r.Get("/push-allowed", h.PushAllowed)
r.Get("/keys", h.InternalKeys)
+
r.Mount("/debug", middleware.Profiler())
return r
}