diff options
Diffstat (limited to 'pprof.go')
| -rw-r--r-- | pprof.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pprof.go b/pprof.go new file mode 100644 index 0000000..bc710e0 --- /dev/null +++ b/pprof.go @@ -0,0 +1,14 @@ +//go:build.sh pprof + +package main + +import ( + "net/http" + "runtime" +) + +func init() { + runtime.SetBlockProfileRate(1) + runtime.SetMutexProfileFraction(1) + go http.ListenAndServe("localhost:6060", nil) +} |
