Skip to content

Latest commit

 

History

History

prof

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

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())
    }