Skip to content

Commit

Permalink
CASMHMS-6324: No /v1 prefix in API
Browse files Browse the repository at this point in the history
  • Loading branch information
jwlv committed Dec 23, 2024
1 parent 9c28237 commit b278311
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cmd/smd/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ import (

func RegisterPProfHandlers(router *mux.Router) {
// Main profiling entry point
router.HandleFunc("/v1/debug/pprof/", pprof.Index) // Index listing all pprof endpoints
router.HandleFunc("/debug/pprof/", pprof.Index) // Index listing all pprof endpoints

// Specific profiling handlers
router.HandleFunc("/v1/debug/pprof/cmdline", pprof.Cmdline) // Command-line arguments
router.HandleFunc("/v1/debug/pprof/profile", pprof.Profile) // CPU profile (default: 30 seconds)
router.HandleFunc("/v1/debug/pprof/symbol", pprof.Symbol) // Symbol resolution for addresses
router.HandleFunc("/v1/debug/pprof/trace", pprof.Trace) // Execution trace (default: 1 second)
router.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline) // Command-line arguments
router.HandleFunc("/debug/pprof/profile", pprof.Profile) // CPU profile (default: 30 seconds)
router.HandleFunc("/debug/pprof/symbol", pprof.Symbol) // Symbol resolution for addresses
router.HandleFunc("/debug/pprof/trace", pprof.Trace) // Execution trace (default: 1 second)

// Additional profiling endpoints
router.Handle("/v1/debug/pprof/allocs", pprof.Handler("allocs")) // Heap allocation samples
router.Handle("/v1/debug/pprof/block", pprof.Handler("block")) // Goroutine blocking events
router.Handle("/v1/debug/pprof/goroutine", pprof.Handler("goroutine")) // Stack traces of all goroutines
router.Handle("/v1/debug/pprof/heap", pprof.Handler("heap")) // Memory heap profile
router.Handle("/v1/debug/pprof/mutex", pprof.Handler("mutex")) // Mutex contention profile
router.Handle("/v1/debug/pprof/threadcreate", pprof.Handler("threadcreate")) // Stack traces of thread creation
}
router.Handle("/debug/pprof/allocs", pprof.Handler("allocs")) // Heap allocation samples
router.Handle("/debug/pprof/block", pprof.Handler("block")) // Goroutine blocking events
router.Handle("/debug/pprof/goroutine", pprof.Handler("goroutine")) // Stack traces of all goroutines
router.Handle("/debug/pprof/heap", pprof.Handler("heap")) // Memory heap profile
router.Handle("/debug/pprof/mutex", pprof.Handler("mutex")) // Mutex contention profile
router.Handle("/debug/pprof/threadcreate", pprof.Handler("threadcreate")) // Stack traces of thread creation
}

0 comments on commit b278311

Please sign in to comment.