- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 75 for RunParallel (0.33 sec)
-
staging/src/k8s.io/apimachinery/pkg/watch/mux_test.go
} wg.Wait() } func BenchmarkBroadCaster(b *testing.B) { event1 := Event{Type: Added, Object: &myType{"foo", "hello world 1"}} m := NewBroadcaster(0, WaitIfChannelFull) b.ResetTimer() b.RunParallel(func(pb *testing.PB) { for pb.Next() { m.Action(event1.Type, event1.Object) } }) b.StopTimer() } func TestBroadcasterWatchAfterShutdown(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 16 15:26:25 UTC 2022 - 8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/cache/expiring_test.go
cache := NewExpiring() keys := []string{} for i := 0; i < numKeys; i++ { key := uuid.New().String() keys = append(keys, key) } b.ResetTimer() b.SetParallelism(256) b.RunParallel(func(pb *testing.PB) { rand := rand.New(rand.NewSource(rand.Int63())) for pb.Next() { i := rand.Int31() key := keys[i%numKeys] _, ok := cache.Get(key) if ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 22 15:51:23 UTC 2023 - 7.3K bytes - Viewed (0) -
tests/integration/ambient/baseline_test.go
src := src t.NewSubTestf("from %v", src.Config().Service).RunParallel(func(t framework.TestContext) { for _, dst := range svcs { dst := dst t.NewSubTestf("to %v", dst.Config().Service).RunParallel(func(t framework.TestContext) { for _, opt := range callOptions { opt := opt t.NewSubTestf("%v", opt.Scheme).RunParallel(func(t framework.TestContext) { opt = opt.DeepCopy()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 12 00:07:28 UTC 2024 - 78.4K bytes - Viewed (0) -
src/math/rand/v2/rand_test.go
} func BenchmarkGlobalInt64(b *testing.B) { var t int64 for n := b.N; n > 0; n-- { t += Int64() } Sink = uint64(t) } func BenchmarkGlobalInt64Parallel(b *testing.B) { b.RunParallel(func(pb *testing.PB) { var t int64 for pb.Next() { t += Int64() } atomic.AddUint64(&Sink, uint64(t)) }) } func BenchmarkGlobalUint64(b *testing.B) { var t uint64
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 17.4K bytes - Viewed (0) -
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/math/big/natconv_test.go
} func BenchmarkStringPiParallel(b *testing.B) { var x nat x, _, _, _ = x.scan(strings.NewReader(pi), 0, false) if string(x.utoa(10)) != pi { panic("benchmark incorrect: conversion failed") } b.RunParallel(func(pb *testing.PB) { for pb.Next() { x.utoa(10) } }) } func BenchmarkScan(b *testing.B) { const x = 10 for _, base := range []int{2, 8, 10, 16} {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 12:54:00 UTC 2019 - 16.8K 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)