- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 100 for newResource (0.17 sec)
-
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go
err = json.NewDecoder(f).Decode(&pod) if err != nil { b.Fatalf("Failed to decode %q: %v", file, err) } list := &v1.PodList{ Items: make([]v1.Pod, n), } r := rand.New(rand.NewSource(benchmarkSeed)) for i := 0; i < n; i++ { list.Items[i] = *pod.DeepCopy() randPod(b, &list.Items[i], r) } return list } func toProtoBuf(b *testing.B, list *v1.PodList) []byte {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 15.7K bytes - Viewed (0) -
internal/rest/client.go
if c.HealthCheckFn != nil && atomic.CompareAndSwapInt32(&c.connected, online, offline) { go func() { backOff := exponentialBackoffWait( rand.New(rand.NewSource(time.Now().UnixNano())), 200*time.Millisecond, 30*time.Second, ) attempt := uint(0) for { if atomic.LoadInt32(&c.connected) == closed { return }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 14.4K bytes - Viewed (0) -
src/math/big/int_test.go
sqrtsq.Mod(&sqrtsq, mod) return sq.Cmp(&sqrtsq) == 0 } func TestModSqrt(t *testing.T) { var elt, mod, modx4, sq, sqrt Int r := rand.New(rand.NewSource(9)) for i, s := range primes[1:] { // skip 2, use only odd primes mod.SetString(s, 10) modx4.Lsh(&mod, 2) // test a few random elements per prime for x := 1; x < 5; x++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 58.5K bytes - Viewed (0) -
pkg/util/iptree/iptree_test.go
} } func generateRandomCIDRs(is6 bool, number int) sets.Set[netip.Prefix] { n := 4 if is6 { n = 16 } cidrs := sets.Set[netip.Prefix]{} rand.New(rand.NewSource(time.Now().UnixNano())) for i := 0; i < number; i++ { bytes := make([]byte, n) for i := 0; i < n; i++ { bytes[i] = uint8(rand.Intn(255)) } ip, ok := netip.AddrFromSlice(bytes) if !ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17.8K bytes - Viewed (0) -
cmd/xl-storage-format_test.go
} // Encode all. This is used for benchmarking. enc, err := xl.AppendTo(nil) if err != nil { b.Fatal(err) } b.Logf("Serialized size: %d bytes", len(enc)) rng := rand.New(rand.NewSource(0)) dump := make([]byte, len(enc)) b.Run("UpdateObjectVersion", func(b *testing.B) { b.SetBytes(int64(size)) b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { // Load...
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 17.6K bytes - Viewed (0) -
cmd/xl-storage-format-v2_test.go
t.Run(test.name, func(t *testing.T) { // Run multiple times, shuffling the input order. for i := int64(0); i < 50; i++ { t.Run(fmt.Sprint(i), func(t *testing.T) { rng := rand.New(rand.NewSource(i)) rng.Shuffle(len(test.input), func(i, j int) { test.input[i], test.input[j] = test.input[j], test.input[i] }) got := mergeXLV2Versions(test.quorum, true, 0, test.input...)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Mar 08 17:50:48 UTC 2024 - 36.4K bytes - Viewed (0) -
src/index/suffixarray/suffixarray_test.go
for i := 0; i < b.N; i++ { New(data) } }) } }) } }) } } func BenchmarkSaveRestore(b *testing.B) { r := rand.New(rand.NewSource(0x5a77a1)) // guarantee always same sequence data := make([]byte, 1<<20) // 1MB of data to index for i := range data { data[i] = byte(r.Intn(256)) } for _, bits := range []int{32, 64} {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 14.1K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/ipallocator.go
ipAddressSynced: ipAddressInformer.Informer().HasSynced, metrics: &emptyMetricsRecorder{}, // disabled by default metricLabel: cidr.String(), rand: rand.New(rand.NewSource(time.Now().UnixNano())), } a.ready.Store(true) return a, nil } func (a *Allocator) createIPAddress(name string, svc *api.Service, scope string) error { ipAddress := networkingv1alpha1.IPAddress{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 31 21:05:04 UTC 2023 - 17K bytes - Viewed (0) -
cmd/erasure-decode_test.go
if err != nil { t.Fatal(err) } if n != length { t.Errorf("erasureCreateFile returned %d, expected %d", n, length) } // To generate random offset/length. r := rand.New(rand.NewSource(UTCNow().UnixNano())) buf := &bytes.Buffer{} // Verify erasure.Decode() for random offsets and lengths. for i := 0; i < iterations; i++ { offset := r.Int63n(length)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 21.1K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/compile.go
if f.Log() { f.Logf("compiling %s\n", f.Name) } var rnd *rand.Rand if checkEnabled { seed := int64(crc32.ChecksumIEEE(([]byte)(f.Name))) ^ int64(checkRandSeed) rnd = rand.New(rand.NewSource(seed)) } // hook to print function & phase if panic happens phaseName := "init" defer func() { if phaseName != "" { err := recover() stack := make([]byte, 16384)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:55:18 UTC 2024 - 18.6K bytes - Viewed (0)