- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 348 for gomaxprocs (0.36 sec)
-
internal/dsync/drwmutex_test.go
} } cdone <- true } // Borrowed from rwmutex_test.go func hammerRWMutex(t *testing.T, gomaxprocs, numReaders, numIterations int) { t.Run(fmt.Sprintf("%d-%d-%d", gomaxprocs, numReaders, numIterations), func(t *testing.T) { resource := "test" runtime.GOMAXPROCS(gomaxprocs) // Number of active readers + 10000 * number of active writers. var activity int32 cdone := make(chan bool)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
src/runtime/race/sched_test.go
import ( "fmt" "reflect" "runtime" "strings" "testing" ) func TestRandomScheduling(t *testing.T) { // Scheduler is most consistent with GOMAXPROCS=1. // Use that to make the test most likely to fail. defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1)) const N = 10 out := make([][]int, N) for i := 0; i < N; i++ { c := make(chan int, N) for j := 0; j < N; j++ { go func(j int) { c <- j
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 08 13:27:43 UTC 2022 - 977 bytes - Viewed (0) -
src/testing/allocs.go
// a warm-up. The average number of allocations over the specified number of // runs will then be measured and returned. // // AllocsPerRun sets GOMAXPROCS to 1 during its measurement and will restore // it before returning. func AllocsPerRun(runs int, f func()) (avg float64) { defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1)) // Warm up the function f() // Measure the starting statistics var memstats runtime.MemStats
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 02 00:13:47 UTC 2016 - 1.4K 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) -
internal/lsync/lrwmutex_test.go
clocked <- true <-cunlock m.RUnlock() cdone <- true } } // Borrowed from rwmutex_test.go func doTestParallelReaders(numReaders, gomaxprocs int) { runtime.GOMAXPROCS(gomaxprocs) m := NewLRWMutex() clocked := make(chan bool) cunlock := make(chan bool) cdone := make(chan bool) for i := 0; i < numReaders; i++ {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K 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) -
test/fixedbugs/bug370.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 318 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) -
src/runtime/runtime_unix_test.go
"testing" ) func TestGoroutineProfile(t *testing.T) { // GoroutineProfile used to use the wrong starting sp for // goroutines coming out of system calls, causing possible // crashes. defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(100)) var stop uint32 defer atomic.StoreUint32(&stop, 1) // in case of panic var wg sync.WaitGroup for i := 0; i < 4; i++ { wg.Add(1) go func() { for atomic.LoadUint32(&stop) == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 1.2K bytes - Viewed (0) -
src/context/benchmark_test.go
}) } } func benchmarkWithTimeout(b *testing.B, concurrentContexts int) { gomaxprocs := runtime.GOMAXPROCS(0) perPContexts := concurrentContexts / gomaxprocs root := Background() // Generate concurrent contexts. var wg sync.WaitGroup ccf := make([][]CancelFunc, gomaxprocs) for i := range ccf { wg.Add(1) go func(i int) { defer wg.Done() cf := make([]CancelFunc, perPContexts)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 02 00:44:24 UTC 2021 - 3.8K bytes - Viewed (0)