- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 282 for gomaxprocs (0.11 sec)
-
src/internal/trace/testdata/testprog/gomaxprocs.go
// Start tracing. if err := trace.Start(os.Stdout); err != nil { log.Fatalf("failed to start tracing: %v", err) } // Run GOMAXPROCS a bunch of times, up and down. for i := 1; i <= 16; i *= 2 { runtime.GOMAXPROCS(i) time.Sleep(1 * time.Millisecond) } for i := 16; i >= 1; i /= 2 { runtime.GOMAXPROCS(i) time.Sleep(1 * time.Millisecond) } // Stop tracing. trace.Stop()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 967 bytes - Viewed (0) -
src/runtime/rwmutex_test.go
panic(fmt.Sprintf("wlock(%d)\n", n)) } for i := 0; i < 100; i++ { } atomic.AddInt32(activity, -10000) rwm.Unlock() } cdone <- true } func HammerRWMutex(gomaxprocs, numReaders, num_iterations int) { GOMAXPROCS(gomaxprocs) // Number of active readers + 10000 * number of active writers. var activity int32 var rwm RWMutex rwm.Init() cdone := make(chan bool)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 15 22:00:45 UTC 2023 - 4.2K bytes - Viewed (0) -
src/runtime/testdata/testprog/lockosthread.go
// checks that the runtime doesn't do anything terrible. // This requires GOMAXPROCS=1 from the beginning to reliably // start a goroutine on the main thread. if runtime.GOMAXPROCS(-1) != 1 { println("requires GOMAXPROCS=1") os.Exit(1) } ready := make(chan bool, 1) go func() { // Because GOMAXPROCS=1, this *should* be on the main // thread. Stay there. runtime.LockOSThread()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:00:09 UTC 2024 - 6.6K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stress-start-stop.go
// blocked goroutines, LockOSThread, pipes, and GOMAXPROCS). //go:build ignore package main import ( "bytes" "io" "log" "net" "os" "runtime" "runtime/trace" "sync" "time" ) func main() { defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(8)) outerDone := make(chan bool) go func() { defer func() { outerDone <- true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.7K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_fuzz_deadline.txt
[!fuzz] skip [short] skip env GOCACHE=$WORK/cache # Warm up the build cache with GOMAXPROCS unrestricted. go test -c -o $devnull # For the fuzzing phase, we reduce GOMAXPROCS to avoid consuming too many # resources during the test. Ideally this would just free up resources to run # other parallel tests more quickly, but unfortunately it is actually necessary # in some 32-bit environments to prevent the fuzzing engine from running out of
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 01 20:09:52 UTC 2024 - 1.5K bytes - Viewed (0) -
src/runtime/debug_test.go
func TestDebugCallUnsafePoint(t *testing.T) { skipUnderDebugger(t) // This can deadlock if there aren't enough threads or if a GC // tries to interrupt an atomic loop (see issue #10958). defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(8)) // InjectDebugCall cannot be executed while a GC is actively in // progress. Wait until the current GC is done, and turn it off. // // See #49370. runtime.GC()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 15:08:04 UTC 2023 - 8K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stress.go
// license that can be found in the LICENSE file. // Tests a many interesting cases (network, syscalls, a little GC, busy goroutines, // blocked goroutines, LockOSThread, pipes, and GOMAXPROCS). //go:build ignore package main import ( "log" "net" "os" "runtime" "runtime/trace" "sync" "time" ) func main() { var wg sync.WaitGroup done := make(chan bool)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.5K bytes - Viewed (0) -
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) -
src/internal/trace/testdata/testprog/stacks.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.4K bytes - Viewed (0) -
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)