- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 59 for RunParallel (0.15 sec)
-
src/log/slog/logger_test.go
for i := 0; i < b.N; i++ { l.LogAttrs(ctx, LevelInfo, "msg", Int("a", 1), String("b", "two"), Bool("c", true)) } }) b.Run("attrs-parallel", func(b *testing.B) { b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { for pb.Next() { l.LogAttrs(ctx, LevelInfo, "msg", Int("a", 1), String("b", "two"), Bool("c", true)) } }) }) b.Run("keys-values", func(b *testing.B) { b.ReportAllocs()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 10 21:25:30 UTC 2023 - 19.5K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
mu.Lock(id, source) mu.RUnlock(context.Background()) } // Borrowed from rwmutex_test.go func benchmarkRWMutex(b *testing.B, localWork, writeRatio int) { b.ResetTimer() b.ReportAllocs() b.RunParallel(func(pb *testing.PB) { foo := 0 for pb.Next() { rwm := NewDRWMutex(ds, "test") foo++ if foo%writeRatio == 0 { rwm.Lock(id, source) rwm.Unlock(context.Background()) } else {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin_test.go
b.Errorf("%s: failed to validate initialization: %v", tt.Name, err) return } attr := webhooktesting.NewAttribute(ns, nil, tt.IsDryRun) b.ResetTimer() b.RunParallel(func(pb *testing.PB) { for pb.Next() { wh.Validate(context.TODO(), attr, objectInterfaces) } }) }) } } // TestValidate tests that ValidatingWebhook#Validate works as expected
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:06:52 UTC 2024 - 11.9K bytes - Viewed (0) -
src/sync/map_bench_test.go
m = reflect.New(reflect.TypeOf(m).Elem()).Interface().(mapInterface) if bench.setup != nil { bench.setup(b, m) } b.ResetTimer() var i int64 b.RunParallel(func(pb *testing.PB) { id := int(atomic.AddInt64(&i, 1) - 1) bench.perG(b, pb, id*b.N, m) }) }) } } func BenchmarkLoadMostlyHits(b *testing.B) { const hits, misses = 1023, 1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 01 15:34:22 UTC 2024 - 11.5K bytes - Viewed (0) -
cmd/format-erasure_test.go
b.ResetTimer() b.ReportAllocs() fsDirs, err := getRandomDisks(nDisks) if err != nil { b.Fatal(err) } endpoints := mustGetNewEndpoints(0, 16, fsDirs...) b.RunParallel(func(pb *testing.PB) { endpoints := endpoints for pb.Next() { initStorageDisksWithErrors(endpoints, storageOpts{cleanUp: false, healthCheck: false}) } })
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Apr 15 08:25:46 UTC 2024 - 12.9K bytes - Viewed (0) -
src/regexp/all_test.go
re := MustCompile("foo (ba+r)? baz") b.ResetTimer() b.RunParallel(func(pb *testing.PB) { for pb.Next() { re.Match(x) } }) } func BenchmarkMatchParallelCopied(b *testing.B) { x := []byte("this is a long line that contains foo bar baz") re := MustCompile("foo (ba+r)? baz") b.ResetTimer() b.RunParallel(func(pb *testing.PB) { re := re.Copy() for pb.Next() { re.Match(x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:36:03 UTC 2024 - 25.8K bytes - Viewed (0) -
plugin/pkg/auth/authorizer/node/node_authorizer_test.go
g := NewGraph() populate(g, nodes, pods, pvs, attachments, slices) // Garbage collect before the first iteration runtime.GC() b.ResetTimer() b.SetParallelism(100) b.RunParallel(func(pb *testing.PB) { for pb.Next() { g.AddPod(pods[0]) } }) } func BenchmarkAuthorization(b *testing.B) { g := NewGraph() opts := &sampleDataOpts{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 21:22:55 UTC 2024 - 40.5K bytes - Viewed (0) -
src/math/rand/rand_test.go
}) } } // Benchmarks func BenchmarkInt63Threadsafe(b *testing.B) { for n := b.N; n > 0; n-- { Int63() } } func BenchmarkInt63ThreadsafeParallel(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { Int63() } }) } func BenchmarkInt63Unthreadsafe(b *testing.B) { r := New(NewSource(1)) for n := b.N; n > 0; n-- { r.Int63() } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 16.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator_test.go
return s.lookup(ctx, token) }), true, 4*time.Second, 500*time.Millisecond, clock.RealClock{}, ) b.ResetTimer() b.SetParallelism(s.threadCount) b.RunParallel(func(pb *testing.PB) { r := mathrand.New(mathrand.NewSource(mathrand.Int63())) for pb.Next() { // some problems appear with random access, some appear with many // requests for a single entry, so we do both.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 20.3K bytes - Viewed (0) -
src/net/rpc/server_test.go
once.Do(startServer) client, err := dial() if err != nil { b.Fatal("error dialing:", err) } defer client.Close() // Synchronous calls args := &Args{7, 8} b.ResetTimer() b.RunParallel(func(pb *testing.PB) { reply := new(Reply) for pb.Next() { err := client.Call("Arith.Add", args, reply) if err != nil { b.Fatalf("rpc error: Add: expected no error but got string %q", err.Error())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 18 05:23:29 UTC 2023 - 19K bytes - Viewed (0)