Browse Source

pprof debug

Darien Raymond 8 năm trước cách đây
mục cha
commit
d809973621
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      main/distro/debug/debug.go

+ 10 - 0
main/distro/debug/debug.go

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