prof
封装官方net/http/pprof
路由,添加profile io wait time路由。
使用示例
mux := http.NewServeMux()
prof.Register(r, WithPrefix("/myServer"), WithIOWaitTime())
httpServer := &http.Server{
Addr: ":8080",
Handler: mux,
}
if err := httpServer.ListenAndServe(); err != nil && err != http.ErrServerClosed {
panic("listen and serve error: " + err.Error())
}