- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 75 for RunParallel (0.11 sec)
-
cmd/jwt_test.go
b.Fatal(err) } creds := globalActiveCred token, err := authenticateNode(creds.AccessKey, creds.SecretKey, "") if err != nil { b.Fatal(err) } b.ResetTimer() b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { err = xjwt.ParseWithStandardClaims(token, xjwt.NewStandardClaims(), []byte(creds.SecretKey)) if err != nil { b.Fatal(err) } } }) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Apr 19 16:45:14 UTC 2024 - 4.5K bytes - Viewed (0) -
src/cmd/go/init_test.go
testenv.MustHaveExec(b) gotool, err := testenv.GoTool() if err != nil { b.Fatal(err) } // We collect extra metrics. var n, userTime, systemTime int64 b.ResetTimer() b.RunParallel(func(pb *testing.PB) { for pb.Next() { cmd := testenv.Command(b, gotool, "env", "GOARCH") if err := cmd.Run(); err != nil { b.Fatal(err) } atomic.AddInt64(&n, 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 15 20:21:26 UTC 2022 - 1.1K bytes - Viewed (0) -
src/mime/type_test.go
func BenchmarkTypeByExtension(b *testing.B) { initMime() b.ResetTimer() for _, ext := range []string{ ".html", ".HTML", ".unused", } { b.Run(ext, func(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { TypeByExtension(ext) } }) }) } } func BenchmarkExtensionsByType(b *testing.B) { initMime() b.ResetTimer()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 08 21:09:03 UTC 2022 - 4.9K bytes - Viewed (0) -
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) -
src/sync/once_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 16 21:22:33 UTC 2014 - 1.1K bytes - Viewed (0) -
src/sync/rwmutex_test.go
RWMutex pad [32]uint32 } b.RunParallel(func(pb *testing.PB) { var rwm PaddedRWMutex 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 b.RunParallel(func(pb *testing.PB) { foo := 0 for pb.Next() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 29 17:13:13 UTC 2021 - 4.9K bytes - Viewed (0) -
src/runtime/mfinal_test.go
func TestFinalizerZeroSizedStruct(t *testing.T) { type Z struct{} z := new(Z) runtime.SetFinalizer(z, func(*Z) {}) } func BenchmarkFinalizer(b *testing.B) { const Batch = 1000 b.RunParallel(func(pb *testing.PB) { var data [Batch]*int for i := 0; i < Batch; i++ { data[i] = new(int) } for pb.Next() { for i := 0; i < Batch; i++ { runtime.SetFinalizer(data[i], fin) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 19 20:45:58 UTC 2023 - 5.6K bytes - Viewed (0) -
src/internal/runtime/atomic/atomic_test.go
if testing.Short() { N = 10 iter = 10000 } inc := uintptr(100) total := uintptr(0) runParallel(N, iter, func() { atomic.Xadduintptr(&total, inc) }) if want := uintptr(N*iter) * inc; want != total { t.Fatalf("xadduintpr error, want %d, got %d", want, total) } total = 0 runParallel(N, iter, func() { atomic.Xadduintptr(&total, inc) atomic.Xadduintptr(&total, uintptr(-int64(inc))) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 8.5K bytes - Viewed (0) -
src/runtime/cgo/handle_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 1.8K bytes - Viewed (0) -
internal/cachevalue/cache_test.go
cache := New[time.Time]() cache.InitOnce(1*time.Millisecond, Opts{}, func(ctx context.Context) (time.Time, error) { return time.Now(), nil }, ) b.ReportAllocs() b.ResetTimer() b.RunParallel(func(pb *testing.PB) { for pb.Next() { cache.Get() } })
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu May 09 00:51:34 UTC 2024 - 2.7K bytes - Viewed (0)