File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,3 +7,7 @@ INFLUXDB_URL=http://localhost:8086
77INFLUXDB_TOKEN = token
88INFLUXDB_ORG = minetracker
99INFLUXDB_BUCKET = minetracker_data
10+
11+ PROFILING_ENABLED = true
12+ PROFILING_PORT = 6060
13+ PROFILING_HOST = localhost
Original file line number Diff line number Diff line change @@ -118,8 +118,8 @@ func main() {
118118
119119 if os .Getenv ("PROFILING_ENABLED" ) == "true" {
120120 go func () {
121- util .Logger .Info ().Msg ("pprof listening on :6060" )
122- if err := http .ListenAndServe ("localhost:6060" , nil ); err != nil {
121+ util .Logger .Info ().Msg ("pprof listening on :" + os . Getenv ( "PROFILING_PORT" ) )
122+ if err := http .ListenAndServe (os . Getenv ( "PROFILING_HOST" ) + ":" + os . Getenv ( "PROFILING_PORT" ) , nil ); err != nil {
123123 util .Logger .Error ().Err (err ).Msg ("pprof server failed" )
124124 }
125125 }()
You can’t perform that action at this time.
0 commit comments