summaryrefslogtreecommitdiff
path: root/internal/pprof/pprof.go
blob: c6d11ca3d046760f9521f46d3f0f20f27d3a6136 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package pprof

import (
	"fmt"
	"net/http"
	_ "net/http"
	_ "net/http/pprof"

	"github.com/mimecast/dtail/internal/config"
	"github.com/mimecast/dtail/internal/io/logger"
)

// Start the profiler HTTP server.
func Start() {
	bindAddr := fmt.Sprintf("%s:%d", config.Common.PProfBindAddress, config.Common.PProfPort)
	logger.Info("Starting PProf server", bindAddr)
	go http.ListenAndServe(bindAddr, nil)
}