pprof: add pprof conditional compilation

This commit is contained in:
nadoo committed 2018-07-17 22:14:12 +08:00
1 parent c8c4d5c75c
commit 9d42885922
3 files changed
+18 -2

No files matched your search

+5 -1
View File
@@ -104,7 +104,11 @@ type Question struct {
// RR format
// https://tools.ietf.org/html/rfc1035#section-3.2.1
// All RRs have the same top level format shown below:
// https://tools.ietf.org/html/rfc1035#section-4.1.3
// The answer, authority, and additional sections all share the same
// format: a variable number of resource records, where the number of
// records is specified in the corresponding count field in the header.
// Each resource record has the following format:
//
// 1 1 1 1 1 1
// 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+1 -1
View File
@@ -25,7 +25,7 @@ import (
)
// VERSION .
const VERSION = "0.6.2"
const VERSION = "0.6.3"
func dialerFromConf() proxy.Dialer {
// global forwarders in xx.conf
+12
View File
@@ -0,0 +1,12 @@
//+build pprof
package main
import _ "net/http/pprof"
import "net/http"
func init() {
go func() {
http.ListenAndServe(":6060", nil)
}()
}