/debug/pprof
GO-S2108 2
3import (
4 "context"
5 _ "net/http/pprof" 6 "time"
7
8 "github.com/ansel1/merry"
3import (
4 "context"
5 "math"
6 _ "net/http/pprof" 7
8 "github.com/ansel1/merry"
9 "github.com/go-graphite/carbonapi/zipper/types"
Importing net/http/pprof
will automatically expose a debug endpoint
/debug/pprof
that exposes sensitive application information such as the heap
profile and CPU profile, also impacting the application performance. It is
recommended to remove the net/http/pprof
import in production builds.
package main
import (
_ "net/http/pprof"
)