Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 95 for allocIPs (0.2 sec)

  1. pkg/registry/core/service/storage/alloc.go

    			service.Spec.ClusterIPs = append(service.Spec.ClusterIPs, "" /* just a marker */)
    		}
    
    		toAlloc[ipFamily] = service.Spec.ClusterIPs[i]
    	}
    
    	// allocate
    	allocated, err := al.allocIPs(service, toAlloc, dryRun)
    
    	// set if successful
    	if err == nil {
    		for family, ip := range allocated {
    			for i, check := range service.Spec.IPFamilies {
    				if family == check {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:05 UTC 2023
    - 37.3K bytes
    - Viewed (0)
  2. src/testing/allocs.go

    Brad Fitzpatrick <******@****.***> 1456874515 +0000
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 02 00:13:47 UTC 2016
    - 1.4K bytes
    - Viewed (0)
  3. src/runtime/testdata/testprogcgo/racesig.go

    	int i;
    	void *a[CALLS];
    
    	for (i = 0; i < ALLOCERS; i++) {
    		sched_yield();
    	}
    	for (i = 0; i < CALLS; i++) {
    		a[i] = malloc(i);
    	}
    	for (i = 0; i < CALLS; i++) {
    		free(a[i]);
    	}
    	return NULL;
    }
    
    void runRaceSignalThread() {
    	int i;
    	pthread_t m[ALLOCERS];
    	pthread_t s[SIGNALERS];
    
    	for (i = 0; i < ALLOCERS; i++) {
    		pthread_create(&m[i], NULL, mallocThread, NULL);
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 01:46:05 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  4. src/strconv/strconv_test.go

    		Buffer: make([]byte, 1024),
    	}
    
    	checkNoAllocs := func(f func()) func(t *testing.T) {
    		return func(t *testing.T) {
    			t.Helper()
    			if allocs := testing.AllocsPerRun(runsPerTest, f); allocs != 0 {
    				t.Errorf("got %v allocs, want 0 allocs", allocs)
    			}
    		}
    	}
    
    	t.Run("Atoi", checkNoAllocs(func() {
    		Sink.Int, Sink.Error = Atoi(string(bytes.Number))
    	}))
    	t.Run("ParseBool", checkNoAllocs(func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 20:29:22 UTC 2022
    - 4.7K bytes
    - Viewed (0)
  5. pkg/cache/bench.baseline

    BenchmarkLRUGetConcurrent-8      	 1000000	      1984 ns/op	       0 B/op	       0 allocs/op
    BenchmarkLRUSet-8                	20000000	        64.7 ns/op	       0 B/op	       0 allocs/op
    BenchmarkLRUSetConcurrent-8      	 1000000	      2315 ns/op	       0 B/op	       0 allocs/op
    BenchmarkLRUGetSetConcurrent-8   	 1000000	      2299 ns/op	       0 B/op	       0 allocs/op
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  6. src/testing/allocs_test.go

    	{"alloc byte", func() { global = new(byte) }, 1},
    }
    
    func TestAllocsPerRun(t *testing.T) {
    	for _, tt := range allocsPerRunTests {
    		if allocs := testing.AllocsPerRun(100, tt.fn); allocs != tt.allocs {
    			t.Errorf("AllocsPerRun(100, %s) = %v, want %v", tt.name, allocs, tt.allocs)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 817 bytes
    - Viewed (0)
  7. src/cmd/compile/internal/test/issue53888_test.go

    			t.Errorf("got %f allocs, want 0", n)
    		}
    		type S []byte
    
    		s := make(S, n)
    		g := func() {
    			s = append(s[:0], make(S, n)...)
    		}
    		if n := testing.AllocsPerRun(10, g); n > 0 {
    			t.Errorf("got %f allocs, want 0", n)
    		}
    		h := func() {
    			s = append(s[:0], make([]byte, n)...)
    		}
    		if n := testing.AllocsPerRun(10, h); n > 0 {
    			t.Errorf("got %f allocs, want 0", n)
    		}
    		i := func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 09 12:18:20 UTC 2022
    - 1K bytes
    - Viewed (0)
  8. src/crypto/internal/nistec/nistec_test.go

    				t.Fatal(err)
    			}
    			out = p.BytesCompressed()
    			if _, err := p.SetBytes(out); err != nil {
    				t.Fatal(err)
    			}
    		}); allocs > 0 {
    			t.Errorf("expected zero allocations, got %0.1f", allocs)
    		}
    	})
    	t.Run("P256", func(t *testing.T) {
    		if allocs := testing.AllocsPerRun(10, func() {
    			p := nistec.NewP256Point().SetGenerator()
    			scalar := make([]byte, 32)
    			rand.Read(scalar)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 12 18:48:23 UTC 2023
    - 8.4K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/conc_alloc_test.go

    			}
    		} else if f64RelDiff(alloc, allocs[idx]) > fpSlack {
    			t.Fatalf("For requiredSum=%v, %s classes=%#+v got solution %v, %v in which item %d got alloc %v should be %v (which is proportional to its target) but is not", requiredSum, style, classes, allocs, fairProp, idx, allocs[idx], alloc)
    		}
    	}
    	t.Logf("For requiredSum=%v, %s classes=%#+v got solution %v, %v", requiredSum, style, classes, allocs, fairProp)
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 18:17:27 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  10. src/strings/builder_test.go

    		}
    	})
    }
    
    func TestBuilderGrowSizeclasses(t *testing.T) {
    	s := Repeat("a", 19)
    	allocs := testing.AllocsPerRun(100, func() {
    		var b Builder
    		b.Grow(18)
    		b.WriteString(s)
    		_ = b.String()
    	})
    	if allocs > 1 {
    		t.Fatalf("unexpected amount of allocations: %v, want: 1", allocs)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 19 19:51:15 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top