File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -111,14 +111,16 @@ func run() {
111
111
doProfilingCpu := false
112
112
trafficUtils .InitVar ("AKTO_DEBUG_CPU_PROFILING" , & doProfilingCpu )
113
113
114
- if doProfilingCpu {
115
- ticker := time .NewTicker (time .Minute ) // Create a ticker to trigger every minute
116
- defer ticker .Stop ()
114
+ go func () {
115
+ if doProfilingCpu {
116
+ ticker := time .NewTicker (time .Minute ) // Create a ticker to trigger every minute
117
+ defer ticker .Stop ()
117
118
118
- for range ticker .C {
119
- captureCpuProfile () // Capture memory profile every time the ticker ticks
119
+ for range ticker .C {
120
+ captureCpuProfile () // Capture memory profile every time the ticker ticks
121
+ }
120
122
}
121
- }
123
+ }()
122
124
123
125
trafficMetrics .InitTrafficMaps ()
124
126
trafficMetrics .StartMetricsTicker ()
You can’t perform that action at this time.
0 commit comments