util/profile was replaced by github.com/anacrolix/envpprof
This commit is contained in:
parent
f98d9c0a47
commit
3a206d4f12
|
@ -12,7 +12,6 @@ import (
|
|||
_ "github.com/anacrolix/envpprof"
|
||||
|
||||
"github.com/anacrolix/torrent/dht"
|
||||
_ "github.com/anacrolix/torrent/util/profile"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
package profile
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"os"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if httpAddr := os.Getenv("GOPROF"); httpAddr != "" {
|
||||
go func() {
|
||||
err := http.ListenAndServe(httpAddr, nil)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue