- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 59 for RunParallel (0.22 sec)
-
src/internal/concurrent/hashtriemap_bench_test.go
} func benchmarkHashTrieMapLoad(b *testing.B, data []string) { b.ReportAllocs() m := NewHashTrieMap[string, int]() for i := range data { m.LoadOrStore(data[i], i) } b.ResetTimer() b.RunParallel(func(pb *testing.PB) { i := 0 for pb.Next() { _, _ = m.Load(data[i]) i++ if i >= len(data) { i = 0 } } }) } func BenchmarkHashTrieMapLoadOrStore(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 21:20:09 UTC 2024 - 1.3K bytes - Viewed (0) -
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) -
src/unique/handle_bench_test.go
handles := make([]Handle[string], 0, len(testData)) for i := range testData { handles = append(handles, Make(testData[i])) } b.ReportAllocs() b.ResetTimer() b.RunParallel(func(pb *testing.PB) { i := 0 for pb.Next() { _ = Make(testData[i]) i++ if i >= len(testData) { i = 0 } } }) b.StopTimer() runtime.GC() runtime.GC() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:14:07 UTC 2024 - 1.1K bytes - Viewed (0) -
src/internal/runtime/atomic/atomic_andor_test.go
sink = &x for i := 0; i < b.N; i++ { atomic.And32(&x[63], uint32(i)) } } func BenchmarkAnd32Parallel(b *testing.B) { var x [128]uint32 // give x its own cache line sink = &x b.RunParallel(func(pb *testing.PB) { i := uint32(0) for pb.Next() { atomic.And32(&x[63], i) i++ } }) } func BenchmarkAnd64(b *testing.B) { var x [128]uint64 // give x its own cache line
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Apr 27 20:49:32 UTC 2024 - 5.2K bytes - Viewed (0) -
src/runtime/rwmutex_test.go
RWMutex pad [32]uint32 } b.RunParallel(func(pb *testing.PB) { var rwm PaddedRWMutex rwm.Init() for pb.Next() { rwm.RLock() rwm.RLock() rwm.RUnlock() rwm.RUnlock() rwm.Lock() rwm.Unlock() } }) } func benchmarkRWMutex(b *testing.B, localWork, writeRatio int) { var rwm RWMutex rwm.Init() b.RunParallel(func(pb *testing.PB) { foo := 0
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/fmt/fmt_test.go
func BenchmarkSprintfPadding(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { _ = Sprintf("%16f", 1.0) } }) } func BenchmarkSprintfEmpty(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { _ = Sprintf("") } }) } func BenchmarkSprintfString(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:31:55 UTC 2024 - 58.6K bytes - Viewed (0) -
src/internal/poll/splice_linux_test.go
} }) } func BenchmarkSplicePipePoolParallel(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { p, err := poll.GetPipe() if err != nil { continue } poll.PutPipe(p) } }) } func BenchmarkSplicePipeNativeParallel(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { p := poll.NewPipe() if p == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:49:26 UTC 2024 - 2.8K bytes - Viewed (0) -
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) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/bench_test.go
structured, err := runtime.Decode(decoder, test.obj) if err != nil { b.Fatalf("Failed to parse yaml object: %v", err) } b.Run("structured", func(b *testing.B) { b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { _, err := fakeTypeConverter.ObjectToTyped(structured) if err != nil { b.Errorf("Error in ObjectToTyped: %v", err) } } })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 8.9K bytes - Viewed (0) -
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)