Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 162 for newResource (0.39 sec)

  1. pkg/controller/certificates/signer/signer_test.go

    				t.Errorf("unexpected err: %v", err)
    			}
    			c.verify(t, client.Actions())
    		})
    	}
    }
    
    // noncryptographic for faster testing
    // DO NOT COPY THIS CODE
    var insecureRand = rand.New(rand.NewSource(0))
    
    type csrBuilder struct {
    	cn         string
    	dnsNames   []string
    	org        []string
    	signerName string
    	approved   bool
    	failed     bool
    	usages     []capi.KeyUsage
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 02 21:12:04 UTC 2022
    - 15K bytes
    - Viewed (0)
  2. 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)
  3. src/cmd/compile/internal/ssa/rewriteCond_test.go

    	} else {
    		t.Errorf("'%#x - %#x>>%#x >= 0' failed", y32, v32, uz)
    	}
    
    	if y32-int32(uv32>>uz) <= 0 {
    		t.Errorf("'%#x - int32(%#x>>%#x) <= 0' failed", y32, uv32, uz)
    	}
    }
    
    var rnd = rand.New(rand.NewSource(0))
    var sink int64
    
    func benchSoloJump(b *testing.B) {
    	r1 := x64
    	r2 := x64b
    	r3 := x64c
    	r4 := y64
    	d := rnd.Int63n(10)
    
    	// 6 out 10 conditions evaluate to true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 24 01:19:09 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top