- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 348 for Gomaxprocs (0.16 sec)
-
src/strconv/strconv_test.go
func TestCountMallocs(t *testing.T) { if testing.Short() { t.Skip("skipping malloc count in short mode") } if runtime.GOMAXPROCS(0) > 1 { t.Skip("skipping; GOMAXPROCS>1") } // Allocate a big messy buffer for AppendQuoteToASCII's test. oneMB = make([]byte, 1e6) for i := range oneMB { oneMB[i] = byte(i) } for _, mt := range mallocTest {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 20:29:22 UTC 2022 - 4.7K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_cleanup_failnow.txt
# For issue 41355 [short] skip # This test could fail if the testing package does not wait until # a panicking test does the panic. Turn off multithreading and GC # to increase the probability of such a failure. env GOMAXPROCS=1 env GOGC=off # If the test exits with 'no tests to run', it means the testing package # implementation is incorrect and does not wait until a test panic. # If the test exits with '(?s)panic: die.*panic: die', it means
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 16 14:49:13 UTC 2022 - 1.3K bytes - Viewed (0) -
test/mallocfin.go
if final[b.n] != 1 { println("finalB", b.n, final[b.n]) panic("fail") } final[b.n] = 2 nfinal++ } func nofinalB(b *B) { panic("nofinalB run") } func main() { runtime.GOMAXPROCS(4) for i = 0; i < N; i++ { b := &B{i} a := &A{b, i} c := new(B) runtime.SetFinalizer(c, nofinalB) runtime.SetFinalizer(b, finalB) runtime.SetFinalizer(a, finalA) runtime.SetFinalizer(c, nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 23 07:47:26 UTC 2012 - 1.2K bytes - Viewed (0) -
src/internal/trace/gc.go
break } gomaxprocs := int(m.Value.Uint64()) if len(ps) > gomaxprocs { if flags&UtilPerProc != 0 { // End each P's series. for _, p := range ps[gomaxprocs:] { out[p.series] = addUtil(out[p.series], MutatorUtil{int64(ev.Time()), 0}) } } ps = ps[:gomaxprocs] } for len(ps) < gomaxprocs { // Start new P's series. series := 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 26K bytes - Viewed (0) -
src/os/signal/signal_plan9_test.go
waitSig(t, c, syscall.Note("hangup")) } func TestStress(t *testing.T) { dur := 3 * time.Second if testing.Short() { dur = 100 * time.Millisecond } defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(4)) done := make(chan bool) finished := make(chan bool) go func() { sig := make(chan os.Signal, 1) Notify(sig, syscall.Note("alarm")) defer Stop(sig) Loop: for { select {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Mar 14 17:56:50 UTC 2021 - 3.6K bytes - Viewed (0) -
test/fixedbugs/issue25897a.go
// which starts with a reflect-generated function. package main import ( "reflect" "runtime" ) const N = 100 func main() { runtime.GOMAXPROCS(1) // Run GC in a loop. This makes it more likely GC will catch // an unstarted goroutine then if we were to GC after kicking // everything off. go func() { for { runtime.GC() } }()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 19:04:48 UTC 2022 - 1.1K bytes - Viewed (0) -
src/sync/runtime_sema_test.go
} }) } func benchmarkSema(b *testing.B, block, work bool) { if b.N == 0 { return } sem := uint32(0) if block { done := make(chan bool) go func() { for p := 0; p < runtime.GOMAXPROCS(0)/2; p++ { Runtime_Semacquire(&sem) } done <- true }() defer func() { <-done }() } b.RunParallel(func(pb *testing.PB) { foo := 0 for pb.Next() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 05 14:59:31 UTC 2019 - 1.3K bytes - Viewed (0) -
src/go/doc/testdata/benchmark.go
if len(b.output) > 0 { b.trimOutput() fmt.Printf("--- BENCH: %s\n%s", benchName, b.output) } if p := runtime.GOMAXPROCS(-1); p != procs { fmt.Fprintf(os.Stderr, "testing: %s left GOMAXPROCS set to %d\n", benchName, p) } } } } // trimOutput shortens the output from a benchmark, which can be very long. func (b *B) trimOutput() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Oct 02 02:28:27 UTC 2022 - 7.4K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/gc-stress.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 1.5K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/cgo.go
"unsafe" ) func init() { register("CgoSignalDeadlock", CgoSignalDeadlock) register("CgoTraceback", CgoTraceback) register("CgoCheckBytes", CgoCheckBytes) } func CgoSignalDeadlock() { runtime.GOMAXPROCS(100) ping := make(chan bool) go func() { for i := 0; ; i++ { runtime.Gosched() select { case done := <-ping: if done { ping <- true return } ping <- true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 13:20:27 UTC 2017 - 1.8K bytes - Viewed (0)