You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Cloak/cmd/ck-server/pprof_debug.go

19 lines
280 B
Go

// +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)
}