Initial commit *2

This commit is contained in:
Sasha Koshka 2023-03-08 20:12:04 -05:00
parent 8040e56bd0
commit 685dc3ec6c
2 changed files with 19 additions and 0 deletions

9
README.md Normal file
View File

@ -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.

10
hook/ezprof.go Normal file
View File

@ -0,0 +1,10 @@
package ezprof
import "net/http"
import _ "net/http/pprof"
func init () {
go func () {
http.ListenAndServe("localhost:8888", nil)
} ()
}