| author | Alberto Bertogli
<albertito@blitiri.com.ar> 2026-07-26 12:19:32 UTC |
| committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2026-07-26 12:19:32 UTC |
| parent | 8312872ae4449efcb1067e4b00d50206faa41881 |
| pprof.go | +22 | -0 |
diff --git a/pprof.go b/pprof.go new file mode 100644 index 0000000..18eb996 --- /dev/null +++ b/pprof.go @@ -0,0 +1,22 @@ +// This file enables http pprof support. It's only used when the pprof build +// tag is specified. +// +// To build: +// go build -tags pprof +// Run as normal: +// ./firstones http :9595 +// CPU profile: +// go tool pprof -http localhost:9400 -no_browser 'http://localhost:9595/debug/pprof/profile?debug=1&seconds=60' + +//go:build pprof + +package main + +import ( + "fmt" + _ "net/http/pprof" +) + +func init() { + fmt.Println("pprof enabled") +}