Initial commit *2
This commit is contained in:
parent
8040e56bd0
commit
685dc3ec6c
|
@ -0,0 +1,9 @@
|
|||
# ezprof
|
||||
|
||||
Host pprof at localhost:8888 in one line. In any Go file, put:
|
||||
|
||||
```go
|
||||
import _ "git.tebibyte.media/sashakoshka/ezprof/hook"
|
||||
```
|
||||
|
||||
And you will be able to connect to your program with the pprof tool.
|
|
@ -0,0 +1,10 @@
|
|||
package ezprof
|
||||
|
||||
import "net/http"
|
||||
import _ "net/http/pprof"
|
||||
|
||||
func init () {
|
||||
go func () {
|
||||
http.ListenAndServe("localhost:8888", nil)
|
||||
} ()
|
||||
}
|
Loading…
Reference in New Issue