hysteria/app/pprof.go
2023-08-05 12:07:22 -07:00

22 lines
310 B
Go

//go:build pprof
package main
import (
"fmt"
"net/http"
_ "net/http/pprof"
)
const (
pprofListenAddr = ":6060"
)
func init() {
fmt.Printf("!!! pprof enabled, listening on %s\n", pprofListenAddr)
go func() {
if err := http.ListenAndServe(pprofListenAddr, nil); err != nil {
panic(err)
}
}()
}