- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 24 for RunParallel (0.12 sec)
-
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) -
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) -
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)