yahoojapan / ngtd

Serving NGT over HTTP or gRPC ※This project is not maintained. We have moved to a new product, [Vald](https://vald.vdaas.org) .
Apache License 2.0
38 stars 10 forks source link

Can we access pprof api? #14

Closed cloverrose closed 5 years ago

cloverrose commented 5 years ago

pprof is imported in main.go L22. So I want to access pprof api via http request. But I cannot access it now.

In my knowledge we need call http.ListenAndServe, such that

 func main() {
+   go func() {
+       log.Println(http.ListenAndServe("0.0.0.0:PORT", nil))
+   }()

Is it right ? Or ngtd already expose pprof http api ?

cloverrose commented 5 years ago

Does anyone know it?

kpango commented 5 years ago

As for import of pprof, I think that it probably forgot to erase while debugging, so we will not provide pprof. Enabling pprof is not good for performance, so I think that we should erase or comment out it. If you want to use pprof you should debug yourself.

cloverrose commented 5 years ago

@kpango Thank you for your answer. I got it.

kpango commented 5 years ago

resolved by #23