mirror of https://github.com/cbeuw/Cloak
pprof now will not require debug build flag
parent
f9c5ce8560
commit
0695f9df13
@ -1,9 +0,0 @@
|
|||||||
// +build !pprof
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import "log"
|
|
||||||
|
|
||||||
func startPprof(x string) {
|
|
||||||
log.Println("pprof not available in release builds to reduce binary size")
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
// +build pprof
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"log"
|
|
||||||
"net/http"
|
|
||||||
_ "net/http/pprof"
|
|
||||||
"runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
func startPprof(pprofAddr string) {
|
|
||||||
runtime.SetBlockProfileRate(5)
|
|
||||||
go func() {
|
|
||||||
log.Println(http.ListenAndServe(pprofAddr, nil))
|
|
||||||
}()
|
|
||||||
log.Println("pprof listening on " + pprofAddr)
|
|
||||||
}
|
|
Loading…
Reference in New Issue