ՁקPPQM >_ pk] "UYARB -H x86_64-linux-gnu'!_G% %  %g!w% %  %%%͋gw==??? #!!!mm==! '!_ w  9  1! k9!#ca #%!gG % #%%ga %{!w%%#++--+-#7   KK'))!MMc 7 S55 #ggw! -9! + ++    %1#gI}Gw!   9///1 _K ?/  % #gw//1!%!;#++[W-1#  % 7Y!wy'#' +]+35GC' ')3#  % =Ywy -c-7/;/- 7'  bk Ey/var/lib/gems/2.7.0/gems/rake-13.0.3/lib/rake/cpu_counter.rbE
?)A+E require 'rbconfig' def count if RUBY_PLATFORM == 'java' count_via_java_runtime else case RbConfig::CONFIG['host_os'] when /linux/ count_via_cpuinfo when /darwin|bsd/ count_via_sysctl when /mswin|mingw/ count_via_win32 else # Try everything count_via_win32 || count_via_sysctl || count_via_cpuinfo end end end def count_via_java_runtime Java::Java.lang.Runtime.getRuntime.availableProcessors rescue StandardError nil end def count_via_win32 require 'win32ole' wmi = WIN32OLE.connect("winmgmts://") cpu = wmi.ExecQuery("select NumberOfCores from Win32_Processor") # TODO count hyper-threaded in this cpu.to_enum.first.NumberOfCores rescue StandardError, LoadError nil end def count_via_cpuinfo open('/proc/cpuinfo') { |f| f.readlines }.grep(/processor/).size rescue StandardError nil end def count_via_sysctl run 'sysctl', '-n', 'hw.ncpu' end def run(command, *args) cmd = resolve_command(command) if cmd IO.popen [cmd, *args] do |io| io.read.to_i end else nil end end def resolve_command(command) look_for_command("/usr/sbin", command) || look_for_command("/sbin", command) || in_path_command(command) end def look_for_command(dir, command) path = File.join(dir, command) File.exist?(path) ? path : nil end def in_path_command(command) IO.popen ['which', command] do |io| io.eof? ? nil : command end end CEGEE%/EetcIKMOE countQE%count_with_defaultSE9rescue in UWE9rescue in count_with_defaultYE RakeECpuCounterEmethod_defined?E+Eclass_evalEEtcEnprocessorsErequireErespond_to?EnewEdefaultELoadErrorE$!EStandardErrorhl  $ ( , L P X h |