Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for RunParallel (0.08 sec)

  1. src/encoding/json/bench_test.go

    		"key3": 3,
    		"key2": 2,
    		"key1": 1,
    	}
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			if _, err := Marshal(m); err != nil {
    				b.Fatal("Marshal:", err)
    			}
    		}
    	})
    }
    
    func BenchmarkCodeDecoder(b *testing.B) {
    	b.ReportAllocs()
    	if codeJSON == nil {
    		b.StopTimer()
    		codeInit()
    		b.StartTimer()
    	}
    	b.RunParallel(func(pb *testing.PB) {
    		var buf bytes.Buffer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:00:17 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  2. pkg/test/framework/test.go

    	//                     ctx.NewSubTest("T1a").
    	//                         RunParallel(func(ctx framework.TestContext) {
    	//                             // Run in parallel with T1b
    	//                         })
    	//                     ctx.NewSubTest("T1b").
    	//                         RunParallel(func(ctx framework.TestContext) {
    	//                             // Run in parallel with T1a
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  3. src/expvar/expvar_test.go

    		t.Errorf("reqs.Value() = %v, want -2", i)
    	}
    }
    
    func BenchmarkIntAdd(b *testing.B) {
    	var v Int
    
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			v.Add(1)
    		}
    	})
    }
    
    func BenchmarkIntSet(b *testing.B) {
    	var v Int
    
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			v.Set(1)
    		}
    	})
    }
    
    func TestFloat(t *testing.T) {
    	RemoveAll()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:46:19 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  4. src/runtime/pinner_test.go

    		pinner.Unpin()
    	}
    }
    
    func BenchmarkPinnerPinUnpinParallel(b *testing.B) {
    	b.RunParallel(func(pb *testing.PB) {
    		p := new(obj)
    		for pb.Next() {
    			var pinner runtime.Pinner
    			pinner.Pin(p)
    			pinner.Unpin()
    		}
    	})
    }
    
    func BenchmarkPinnerPinUnpinParallelTiny(b *testing.B) {
    	b.RunParallel(func(pb *testing.PB) {
    		p := new(bool)
    		for pb.Next() {
    			var pinner runtime.Pinner
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 18:36:12 UTC 2023
    - 11K bytes
    - Viewed (0)
  5. src/testing/benchmark.go

    			return false
    		}
    	}
    	pb.cache--
    	return true
    }
    
    // RunParallel runs a benchmark in parallel.
    // It creates multiple goroutines and distributes b.N iterations among them.
    // The number of goroutines defaults to GOMAXPROCS. To increase parallelism for
    // non-CPU-bound benchmarks, call [B.SetParallelism] before RunParallel.
    // RunParallel is usually used with the go test -cpu flag.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  6. internal/grid/benchmark_test.go

    				defer cancel()
    				b.ReportAllocs()
    				b.SetBytes(int64(len(payload) * 2))
    				b.ResetTimer()
    				t := time.Now()
    				var ops int64
    				var lat int64
    				b.SetParallelism(par)
    				b.RunParallel(func(pb *testing.PB) {
    					rng := rand.New(rand.NewSource(time.Now().UnixNano()))
    					n := 0
    					var latency int64
    					managers := grid.Managers
    					hosts := grid.Hosts
    					for pb.Next() {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  7. src/runtime/chan_test.go

    			close(x)
    		})
    	})
    }
    
    func BenchmarkChanNonblocking(b *testing.B) {
    	myc := make(chan int)
    	b.RunParallel(func(pb *testing.PB) {
    		for pb.Next() {
    			select {
    			case <-myc:
    			default:
    			}
    		}
    	})
    }
    
    func BenchmarkSelectUncontended(b *testing.B) {
    	b.RunParallel(func(pb *testing.PB) {
    		myc1 := make(chan int, 1)
    		myc2 := make(chan int, 1)
    		myc1 <- 0
    		for pb.Next() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:47:35 UTC 2023
    - 23.4K bytes
    - Viewed (0)
  8. tests/integration/README.md

                    Run(func(ctx framework.TestContext) {
                        ctx.NewSubTest("T1a").
                            RunParallel(func(ctx framework.TestContext) {
                                // Run in parallel with T1b
                            })
                        ctx.NewSubTest("T1b").
                            RunParallel(func(ctx framework.TestContext) {
                                // Run in parallel with T1a
                            })
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 19:04:51 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  9. internal/dsync/dsync_test.go

    	}
    	for i := 0; i < 10; i++ {
    		<-c
    	}
    }
    
    func BenchmarkMutexUncontended(b *testing.B) {
    	b.ResetTimer()
    	b.ReportAllocs()
    
    	type PaddedMutex struct {
    		*DRWMutex
    	}
    	b.RunParallel(func(pb *testing.PB) {
    		mu := PaddedMutex{NewDRWMutex(ds, "")}
    		for pb.Next() {
    			mu.Lock(id, source)
    			mu.Unlock(context.Background())
    		}
    	})
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 11K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin_test.go

    				attr = webhooktesting.NewAttributeUnstructured(ns, tt.AdditionalLabels, tt.IsDryRun)
    			} else {
    				attr = webhooktesting.NewAttribute(ns, tt.AdditionalLabels, tt.IsDryRun)
    			}
    
    			b.ResetTimer()
    			b.RunParallel(func(pb *testing.PB) {
    				for pb.Next() {
    					wh.Admit(context.TODO(), attr, objectInterfaces)
    				}
    			})
    		})
    	}
    }
    
    // TestAdmit tests that MutatingWebhook#Admit works as expected
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:52 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top