func (p *Profiler) Start(addr string, enableStatsviz bool) {
	mux := http.NewServeMux()
	mux.HandleFunc("/debug/pprof/", pprof.Index)
	mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
	mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
	mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
	mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
	if enableStatsviz {
		statsviz.Register(mux)
	}
	p.srv = &http.Server{
		Addr:    addr,
		Handler: mux,
	}
	go p.srv.ListenAndServe()
}
// Start runs a lightweight http server for net/http/pprof with optional stats visualization
// and launches the http server as a goroutine
Start runs a lightweight http server for net/http/pprof with optional stats visualization
and launches the http server as a goroutine
// Start runs a lightweight http server for net / http / pprof with optional stats visualization // and launches the http server as a goroutine
func (p *Profiler) Start(addr string, enableStatsviz bool) {
	mux := http.NewServeMux()
	mux.HandleFunc("/debug/pprof/", pprof.Index)
	mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
	mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
	mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
	mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
	if enableStatsviz {
		statsviz.Register(mux)
	}
	p.srv = &http.Server{
		Addr:    addr,
		Handler: mux,
	}
	go p.srv.ListenAndServe()
}
func ( p * Profiler ) Start ( addr string , enableStatsviz bool ) { mux := http . NewServeMux ( ) mux . HandleFunc ( " " , pprof . Index ) mux . HandleFunc ( " " , pprof . Cmdline ) mux . HandleFunc ( " " , pprof . Profile ) mux . HandleFunc ( " " , pprof . Symbol ) mux . HandleFunc ( " " , pprof . Trace ) if enableStatsviz { statsviz . Register ( mux ) } p . srv = & http . Server { Addr : addr , Handler : mux , } go p . srv . ListenAndServe ( ) }
Start runs a lightweight http server for net/http/pprof with optional stats visualization
and launches the http server as a goroutine
Start runs a lightweight http server for net / http / pprof with optional stats visualization and launches the http server as a goroutine