2021-11-15 11:37:56 +02:00
|
|
|
//go:build pprof
|
2019-06-06 15:39:16 +02:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
_ "net/http/pprof"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
bind := os.Getenv("IMGPROXY_PPROF_BIND")
|
|
|
|
|
|
|
|
if len(bind) == 0 {
|
|
|
|
bind = ":8088"
|
|
|
|
}
|
|
|
|
|
|
|
|
go func() {
|
|
|
|
http.ListenAndServe(bind, nil)
|
|
|
|
}()
|
|
|
|
}
|