File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -176,22 +176,20 @@ def linux?
176176
177177 # Set up the base command with CPU pinning if needed
178178 def base_cmd
179- @base_cmd ||= begin
180- cmd = [ ]
181-
182- if linux?
183- cmd += setarch_prefix
184-
185- # Pin the process to one given core to improve caching and reduce variance on CRuby
186- # Other Rubies need to use multiple cores, e.g., for JIT threads
187- if ruby_description . start_with? ( 'ruby ' ) && !no_pinning
188- # The last few cores of Intel CPU may be slow E-Cores, so avoid using the last one.
189- cpu = [ ( Etc . nprocessors / 2 ) - 1 , 0 ] . max
190- cmd += [ "taskset" , "-c" , "#{ cpu } " ]
191- end
179+ @base_cmd ||= if linux?
180+ cmd = setarch_prefix
181+
182+ # Pin the process to one given core to improve caching and reduce variance on CRuby
183+ # Other Rubies need to use multiple cores, e.g., for JIT threads
184+ if ruby_description . start_with? ( 'ruby ' ) && !no_pinning
185+ # The last few cores of Intel CPU may be slow E-Cores, so avoid using the last one.
186+ cpu = [ ( Etc . nprocessors / 2 ) - 1 , 0 ] . max
187+ cmd . concat ( [ "taskset" , "-c" , "#{ cpu } " ] )
192188 end
193189
194190 cmd
191+ else
192+ [ ]
195193 end
196194 end
197195
You can’t perform that action at this time.
0 commit comments