mirror of
https://github.com/apernet/hysteria.git
synced 2025-04-02 03:57:38 +03:00
22 lines
310 B
Go
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)
|
|
}
|
|
}()
|
|
}
|