debug_routes.go 298 B

123456789101112
  1. package debug // import "github.com/docker/docker/api/server/router/debug"
  2. import (
  3. "context"
  4. "net/http"
  5. "net/http/pprof"
  6. )
  7. func handlePprof(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
  8. pprof.Handler(vars["name"]).ServeHTTP(w, r)
  9. return nil
  10. }