Add optional pprof endpoint for debugging
This commit is contained in:
@@ -15,6 +15,7 @@ type Config struct {
|
||||
EncKey []byte
|
||||
SessionSecret []byte
|
||||
WorkerConcurrency int
|
||||
PprofAddr string // if non-empty, serve net/http/pprof here (e.g. ":6060")
|
||||
}
|
||||
|
||||
func Load() (Config, error) {
|
||||
@@ -25,6 +26,7 @@ func Load() (Config, error) {
|
||||
AuthPass: os.Getenv("AUTH_PASS"),
|
||||
SessionSecret: []byte(os.Getenv("SESSION_SECRET")),
|
||||
WorkerConcurrency: 4,
|
||||
PprofAddr: os.Getenv("PPROF_ADDR"),
|
||||
}
|
||||
if v := os.Getenv("WORKER_CONCURRENCY"); v != "" {
|
||||
n, err := strconv.Atoi(v)
|
||||
|
||||
Reference in New Issue
Block a user