feat(pprof): add pprof HTTP server (#807)
- `PPROF_ENABLED=no` - `PPROF_BLOCK_PROFILE_RATE=0` - `PPROF_MUTEX_PROFILE_RATE=0` - `PPROF_HTTP_SERVER_ADDRESS=":6060"`
This commit is contained in:
@@ -21,6 +21,14 @@ func envToCSV(envKey string) (values []string) {
|
||||
return lowerAndSplit(csv)
|
||||
}
|
||||
|
||||
func envToInt(envKey string) (n int, err error) {
|
||||
s := os.Getenv(envKey)
|
||||
if s == "" {
|
||||
return 0, nil
|
||||
}
|
||||
return strconv.Atoi(s)
|
||||
}
|
||||
|
||||
func envToStringPtr(envKey string) (stringPtr *string) {
|
||||
s := os.Getenv(envKey)
|
||||
if s == "" {
|
||||
|
||||
Reference in New Issue
Block a user