mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 04:02:29 +02:00
pprof for dev
This commit is contained in:
7
main.go
7
main.go
@@ -4,6 +4,7 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
)
|
||||
|
||||
@@ -12,6 +13,12 @@ const version = "2.0.1"
|
||||
type ctxKey string
|
||||
|
||||
func main() {
|
||||
if len(os.Getenv("IMGPROXY_PPROF_BIND")) > 0 {
|
||||
go func() {
|
||||
http.ListenAndServe(os.Getenv("IMGPROXY_PPROF_BIND"), nil)
|
||||
}()
|
||||
}
|
||||
|
||||
s := startServer()
|
||||
|
||||
stop := make(chan os.Signal, 1)
|
||||
|
Reference in New Issue
Block a user