summaryrefslogtreecommitdiff
path: root/pprof.go
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-05-22 16:54:49 +0200
committerewy <ewy0@protonmail.com>2026-05-22 16:54:49 +0200
commit007e2de369f9fc26da3237646de14f2af5052ee8 (patch)
treef81557385628fc93f1ef9616b8bc75a304f9d740 /pprof.go
initial commit
Diffstat (limited to 'pprof.go')
-rw-r--r--pprof.go14
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)
+}