Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 348 for Gomaxprocs (0.28 sec)

  1. src/runtime/testdata/testprog/gc.go

    	// face of varying environments.
    	debug.SetGCPercent(100)
    
    	// Set GOMAXPROCS to 1 to minimize the amount of memory held in the page cache,
    	// and to reduce the chance that the background scavenger gets scheduled.
    	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
    
    	// Allocate allocTotal bytes of memory in allocChunk byte chunks.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 12.1K bytes
    - Viewed (0)
  2. hack/make-rules/test-integration.sh

    KUBE_INTEGRATION_TEST_MAX_CONCURRENCY=${KUBE_INTEGRATION_TEST_MAX_CONCURRENCY:-"-1"}
    if [[ ${KUBE_INTEGRATION_TEST_MAX_CONCURRENCY} -gt 0 ]]; then
      GOMAXPROCS=${KUBE_INTEGRATION_TEST_MAX_CONCURRENCY}
      export GOMAXPROCS
      kube::log::status "Setting parallelism to ${GOMAXPROCS}"
    fi
    
    # Give integration tests longer to run by default.
    KUBE_TIMEOUT=${KUBE_TIMEOUT:--timeout=600s}
    LOG_LEVEL=${LOG_LEVEL:-2}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:57 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  3. src/internal/trace/testdata/testprog/stacks.go

    	if err != nil {
    		log.Fatalf("failed to dial: %v", err)
    	}
    	c.Close()
    	var data [1]byte
    	wp.Write(data[:])
    	<-pipeReadDone
    
    	oldGoMaxProcs := runtime.GOMAXPROCS(0)
    	runtime.GOMAXPROCS(oldGoMaxProcs + 1)
    
    	trace.Stop()
    
    	runtime.GOMAXPROCS(oldGoMaxProcs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  4. pkg/queue/delay.go

    var workerChanBuf = func() int {
    	// Use blocking channel if GOMAXPROCS=1.
    	// This switches context from sender to receiver immediately,
    	// which results in higher performance.
    	var n int
    	if n = runtime.GOMAXPROCS(0); n == 1 {
    		return 0
    	}
    
    	// Make channel non-blocking and set up its capacity with GOMAXPROCS if GOMAXPROCS>1,
    	// otherwise the sender might be dragged down if the receiver is CPU-bound.
    	//
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 20 06:27:31 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  5. src/runtime/testdata/testprog/preempt.go

    import (
    	"runtime"
    	"runtime/debug"
    	"sync/atomic"
    )
    
    func init() {
    	register("AsyncPreempt", AsyncPreempt)
    }
    
    func AsyncPreempt() {
    	// Run with just 1 GOMAXPROCS so the runtime is required to
    	// use scheduler preemption.
    	runtime.GOMAXPROCS(1)
    	// Disable GC so we have complete control of what we're testing.
    	debug.SetGCPercent(-1)
    	// Out of an abundance of caution, also make sure that there are
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 07 17:46:04 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  6. src/internal/trace/testdata/testprog/futile-wakeup.go

    	"log"
    	"os"
    	"runtime"
    	"runtime/trace"
    	"sync"
    )
    
    func main() {
    	if err := trace.Start(os.Stdout); err != nil {
    		log.Fatalf("failed to start tracing: %v", err)
    	}
    
    	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(8))
    	c0 := make(chan int, 1)
    	c1 := make(chan int, 1)
    	c2 := make(chan int, 1)
    	const procs = 2
    	var done sync.WaitGroup
    	done.Add(4 * procs)
    	for p := 0; p < procs; p++ {
    		const iters = 1e3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. internal/s3select/progress.go

    	"github.com/pierrec/lz4"
    )
    
    type countUpReader struct {
    	reader    io.Reader
    	bytesRead int64
    }
    
    // Max bzip2 concurrency across calls. 50% of GOMAXPROCS.
    var bz2Limiter = pbzip2.CreateConcurrencyPool((runtime.GOMAXPROCS(0) + 1) / 2)
    
    func (r *countUpReader) Read(p []byte) (n int, err error) {
    	n, err = r.reader.Read(p)
    	atomic.AddInt64(&r.bytesRead, int64(n))
    	return n, err
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Oct 18 15:44:36 UTC 2021
    - 4.2K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/issue9400_linux.go

    	"runtime/debug"
    	"sync/atomic"
    	"testing"
    
    	"cmd/cgo/internal/test/issue9400"
    )
    
    func test9400(t *testing.T) {
    	// We synchronize through a shared variable, so we need two procs
    	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2))
    
    	// Start signaller
    	atomic.StoreInt32(&issue9400.Baton, 0)
    	go func() {
    		// Wait for RewindAndSetgid
    		for atomic.LoadInt32(&issue9400.Baton) == 0 {
    			runtime.Gosched()
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 18 19:55:29 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  9. src/runtime/debug.go

    package runtime
    
    import (
    	"internal/runtime/atomic"
    	"unsafe"
    )
    
    // GOMAXPROCS sets the maximum number of CPUs that can be executing
    // simultaneously and returns the previous setting. It defaults to
    // the value of [runtime.NumCPU]. If n < 1, it does not change the current setting.
    // This call will go away when the scheduler improves.
    func GOMAXPROCS(n int) int {
    	if GOARCH == "wasm" && n > 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 11 20:38:24 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  10. src/runtime/race/race_test.go

    	// (the tests are simple and the memory is constantly reused).
    	for _, env := range os.Environ() {
    		if strings.HasPrefix(env, "GOMAXPROCS=") ||
    			strings.HasPrefix(env, "GODEBUG=") ||
    			strings.HasPrefix(env, "GORACE=") {
    			continue
    		}
    		cmd.Env = append(cmd.Env, env)
    	}
    	// We set GOMAXPROCS=1 to prevent test flakiness.
    	// There are two sources of flakiness:
    	// 1. Some tests rely on particular execution order.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 6K bytes
    - Viewed (0)
Back to top