Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for numCPU (0.31 sec)

  1. src/runtime/debug.go

    	newprocs = int32(n)
    
    	startTheWorldGC(stw)
    	return ret
    }
    
    // NumCPU returns the number of logical CPUs usable by the current process.
    //
    // The set of available CPUs is checked by querying the operating system
    // at process startup. Changes to operating system CPU allocation after
    // process startup are not reflected.
    func NumCPU() int {
    	return int(ncpu)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 11 20:38:24 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. src/runtime/testdata/testprog/numcpu_freebsd.go

    	}
    
    	// NumCPU from FreeBSDNumCPUHelper come with '\n'.
    	output = bytes.TrimSpace(output)
    	n, err := strconv.Atoi(string(output))
    	if err != nil {
    		return fmt.Errorf("fail to parse output from child '%s', error: %s, output: %s", cmdline, err, output)
    	}
    	if n != len(list) {
    		return fmt.Errorf("runtime.NumCPU() expected to %d, got %d when run with CPU list %s", len(list), n, cListString)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 30 20:09:46 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  3. test/fixedbugs/bug472.dir/p1.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p1
    
    import "runtime"
    
    func E() func() int { return runtime.NumCPU }
    
    func F() func() { return runtime.Gosched }
    
    func G() func() string { return runtime.GOROOT }
    
    func H() func() { return runtime.GC }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 420 bytes
    - Viewed (0)
  4. test/fixedbugs/bug472.dir/p2.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p2
    
    import "runtime"
    
    func E() func() int { return runtime.NumCPU }
    
    func F() func() { return runtime.GC }
    
    func G() func() string { return runtime.GOROOT }
    
    func H() func() { return runtime.Gosched }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 420 bytes
    - Viewed (0)
  5. pkg/cache/cache_test.go

    			if s != tc.stats {
    				t.Errorf("Got stats of %v, expected %v", s, tc.stats)
    			}
    		})
    	}
    }
    
    func testCacheConcurrent(c Cache, t *testing.T) {
    	wg := new(sync.WaitGroup)
    	workers := runtime.NumCPU()
    	wg.Add(workers)
    
    	const numIters = 10000
    	for i := 0; i < workers; i++ {
    		workerNum := i
    		go func() {
    			for j := 0; j < numIters; j++ {
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 15:56:49 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  6. cmd/admin-server-info.go

    			TotalAlloc: memstats.TotalAlloc,
    			Mallocs:    memstats.Mallocs,
    			Frees:      memstats.Frees,
    			HeapAlloc:  memstats.HeapAlloc,
    		},
    		GoMaxProcs:     runtime.GOMAXPROCS(0),
    		NumCPU:         runtime.NumCPU(),
    		RuntimeVersion: runtime.Version(),
    		GCStats: &madmin.GCStats{
    			LastGC:     gcStats.LastGC,
    			NumGC:      gcStats.NumGC,
    			PauseTotal: gcStats.PauseTotal,
    			Pause:      gcStats.Pause,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  7. cmd/kube-proxy/app/server_linux.go

    	return nil, fmt.Errorf("event object not of type node")
    }
    
    func detectNumCPU() int {
    	// try get numCPU from /sys firstly due to a known issue (https://github.com/kubernetes/kubernetes/issues/99225)
    	_, numCPU, err := machine.GetTopology(sysfs.NewRealSysFs())
    	if err != nil || numCPU < 1 {
    		return goruntime.NumCPU()
    	}
    	return numCPU
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 08 13:48:54 UTC 2024
    - 18.1K bytes
    - Viewed (0)
  8. test/fixedbugs/issue13160.go

    	"runtime"
    )
    
    const N = 100000
    
    func main() {
    	// Allocate more Ps than processors.  This raises
    	// the chance that we get interrupted by the OS
    	// in exactly the right (wrong!) place.
    	p := runtime.NumCPU()
    	runtime.GOMAXPROCS(2 * p)
    
    	// Allocate some pointers.
    	ptrs := make([]*int, p)
    	for i := 0; i < p; i++ {
    		ptrs[i] = new(int)
    	}
    
    	// Arena where we read and write pointers like crazy.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 1.5K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/preflight/checks.go

    type NumCPUCheck struct {
    	NumCPU int
    }
    
    // Name returns the label for NumCPUCheck
    func (NumCPUCheck) Name() string {
    	return "NumCPU"
    }
    
    // Check number of CPUs required by kubeadm
    func (ncc NumCPUCheck) Check() (warnings, errorList []error) {
    	numCPU := runtime.NumCPU()
    	if numCPU < ncc.NumCPU {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 03 11:20:55 UTC 2024
    - 39.5K bytes
    - Viewed (0)
  10. pilot/cmd/pilot-agent/config/config.go

    	}
    
    	if proxyConfig.Concurrency.GetValue() == 0 {
    		if CPULimit < runtime.NumCPU() {
    			log.Warnf("concurrency is set to 0, which will use a thread per CPU on the host. However, CPU limit is set lower. "+
    				"This is not recommended and may lead to performance issues. "+
    				"CPU count: %d, CPU Limit: %d.", runtime.NumCPU(), CPULimit)
    		}
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 6.4K bytes
    - Viewed (0)
Back to top