🔧 Enable pprof by default for now

This commit is contained in:
Maxim Lebedev 2023-01-16 16:12:24 +06:00
parent 16c0564c04
commit ddc73036a8
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
2 changed files with 1 additions and 7 deletions

View File

@ -30,7 +30,6 @@ type (
Protocol string `env:"PROTOCOL" envDefault:"http"`
RootURL string `env:"ROOT_URL" envDefault:"{{protocol}}://{{domain}}:{{port}}/"`
StaticURLPrefix string `env:"STATIC_URL_PREFIX"`
EnablePprof bool `env:"ENABLE_PPROF"`
}
ConfigDatabase struct {
@ -88,7 +87,6 @@ func TestConfig(tb testing.TB) *Config {
Server: ConfigServer{
CertificateFile: filepath.Join("https", "cert.pem"),
Domain: "localhost",
EnablePprof: false,
Host: "0.0.0.0",
KeyFile: filepath.Join("https", "key.pem"),
Port: "3000",

View File

@ -101,17 +101,13 @@ var (
}
)
var (
cpuProfilePath, memProfilePath string
enablePprof bool
)
var cpuProfilePath, memProfilePath string
//go:embed assets/*
var staticFS embed.FS
//nolint:gochecknoinits
func init() {
flag.BoolVar(&enablePprof, "pprof", false, "enable pprof mode")
flag.StringVar(&cpuProfilePath, "cpuprofile", "", "set path to saving CPU memory profile")
flag.StringVar(&memProfilePath, "memprofile", "", "set path to saving pprof memory profile")
flag.Parse()