|
|
@@ -13,6 +13,7 @@ import (
|
|
|
"net/http"
|
|
|
_ "net/http/pprof"
|
|
|
"os"
|
|
|
+ "time"
|
|
|
|
|
|
"wartank/server"
|
|
|
)
|
|
|
@@ -24,7 +25,11 @@ func profile() {
|
|
|
port = "8081"
|
|
|
}
|
|
|
for {
|
|
|
- http.ListenAndServe("0.0.0.0:"+port, nil)
|
|
|
+ err := http.ListenAndServe("0.0.0.0:"+port, nil)
|
|
|
+ if err != nil {
|
|
|
+ log.Printf("profile(): in run pprof, err=\n\t%v\n", err)
|
|
|
+ }
|
|
|
+ time.Sleep(time.Second * 1)
|
|
|
}
|
|
|
}
|
|
|
|