- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 75 for RunParallel (0.17 sec)
-
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) -
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/sync/runtime_sema_test.go
package sync_test import ( "runtime" . "sync" "testing" ) func BenchmarkSemaUncontended(b *testing.B) { type PaddedSem struct { sem uint32 pad [32]uint32 } b.RunParallel(func(pb *testing.PB) { sem := new(PaddedSem) for pb.Next() { Runtime_Semrelease(&sem.sem, false, 0) Runtime_Semacquire(&sem.sem) } }) } func benchmarkSema(b *testing.B, block, work bool) {
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/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/context/benchmark_test.go
"testing" "time" ) func BenchmarkCommonParentCancel(b *testing.B) { root := WithValue(Background(), "key", "value") shared, sharedcancel := WithCancel(root) defer sharedcancel() b.ResetTimer() b.RunParallel(func(pb *testing.PB) { x := 0 for pb.Next() { ctx, cancel := WithCancel(shared) if ctx.Value("key").(string) != "value" { b.Fatal("should not be reached") } for i := 0; i < 100; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 02 00:44:24 UTC 2021 - 3.8K bytes - Viewed (0) -
src/sync/mutex_test.go
type PaddedMutex struct { Mutex pad [128]uint8 } b.RunParallel(func(pb *testing.PB) { var mu PaddedMutex for pb.Next() { mu.Lock() mu.Unlock() } }) } func benchmarkMutex(b *testing.B, slack, work bool) { var mu Mutex if slack { b.SetParallelism(10) } b.RunParallel(func(pb *testing.PB) { foo := 0 for pb.Next() { mu.Lock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 16 21:25:35 UTC 2022 - 5.9K 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/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/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) -
cmd/url_test.go
b.ReportAllocs() // the actual benchmark for PutObject starts here. Reset the benchmark timer. b.ResetTimer() if err := req.ParseForm(); err != nil { b.Fatal(err) } b.RunParallel(func(pb *testing.PB) { for pb.Next() { req.Form.Get("uploadId") } }) // Benchmark ends here. Stop timer. b.StopTimer() } // BenchmarkURLQuery - benchmark URL memory allocations
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Nov 16 17:28:29 UTC 2021 - 2K bytes - Viewed (0)