- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 43 for newResource (0.26 sec)
-
src/internal/poll/fd_mutex_test.go
var mu XFDMutex var readState [2]uint64 var writeState [2]uint64 for p := 0; p < P; p++ { go func() { defer func() { done <- !t.Failed() }() r := rand.New(rand.NewSource(rand.Int63())) for i := 0; i < N; i++ { switch r.Intn(3) { case 0: if !mu.Incref() { t.Error("broken") return } if mu.Decref() { t.Error("broken")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 08 03:57:40 UTC 2022 - 4K bytes - Viewed (0) -
staging/src/k8s.io/api/roundtrip_test.go
// I'm only using the generic fuzzer funcs, but at some point in time we might need to // switch to specialized. For now we're happy with the current serialization test. fuzzer := fuzzer.FuzzerFor(genericfuzzer.Funcs, rand.NewSource(seed), codecs) roundtrip.RoundTripExternalTypes(t, scheme, codecs, fuzzer, nil) } func TestCompatibility(t *testing.T) { scheme := runtime.NewScheme() for _, builder := range groups {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 08 04:18:56 UTC 2024 - 5.9K bytes - Viewed (0) -
cmd/dynamic-timeouts_test.go
// Race test. timeout := newDynamicTimeout(time.Second, time.Millisecond) var wg sync.WaitGroup for i := 0; i < runtime.GOMAXPROCS(0); i++ { wg.Add(1) rng := rand.New(rand.NewSource(int64(i))) go func() { defer wg.Done() for i := 0; i < 100; i++ { for j := 0; j < 100; j++ { timeout.LogSuccess(time.Duration(float64(time.Second) * rng.Float64())) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Oct 14 10:08:40 UTC 2022 - 5.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/conc_alloc_test.go
) // floating-point imprecision const fpSlack = 1e-10 // TestConcAlloc tests computeConcurrencyAllocation with a bunch of randomly generated cases. func TestConcAlloc(t *testing.T) { rands := rand.New(rand.NewSource(1234567890)) for i := 0; i < 10000; i++ { test1ConcAlloc(t, rands) } } func test1ConcAlloc(t *testing.T, rands *rand.Rand) { probLen := ([]int{0, 1, 2, 3, 4, 6, 9})[rands.Intn(7)]
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 07 18:17:27 UTC 2022 - 5.3K bytes - Viewed (0) -
cmd/callhome.go
// initCallhome will start the callhome task in the background. func initCallhome(ctx context.Context, objAPI ObjectLayer) { if !globalCallhomeConfig.Enabled() { return } go func() { r := rand.New(rand.NewSource(time.Now().UnixNano())) // Leader node (that successfully acquires the lock inside runCallhome) // will keep performing the callhome. If the leader goes down for some reason,
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 17 16:53:34 UTC 2024 - 5.3K bytes - Viewed (0) -
cmd/erasure-metadata-utils_test.go
testShuffleDisks(t, z) } func Test_hashOrder(t *testing.T) { for x := 1; x < 17; x++ { t.Run(fmt.Sprintf("%d", x), func(t *testing.T) { var first [17]int rng := rand.New(rand.NewSource(0)) var tmp [16]byte rng.Read(tmp[:]) prefix := hex.EncodeToString(tmp[:]) for i := 0; i < 10000; i++ { rng.Read(tmp[:])
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 7.4K bytes - Viewed (0) -
pkg/registry/core/service/allocator/bitmap.go
func NewAllocationMapWithOffset(max int, rangeSpec string, offset int) *AllocationBitmap { a := AllocationBitmap{ strategy: randomScanStrategyWithOffset{ rand: rand.New(rand.NewSource(time.Now().UnixNano())), offset: offset, }, allocated: big.NewInt(0), count: 0, max: max, rangeSpec: rangeSpec, } return &a }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 25 20:32:40 UTC 2023 - 7.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake.go
func NewFake(t time.Time, fuzz time.Duration, r *rand.Rand) (*Fake, counter.GoRoutineCounter) { grc := &waitGroupCounter{} if r == nil { r = rand.New(rand.NewSource(time.Now().UnixNano())) r.Uint64() r.Uint64() r.Uint64() } return &Fake{ FakePassiveClock: *baseclocktest.NewFakePassiveClock(t), clientWG: grc, fuzz: fuzz,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Dec 18 04:27:38 UTC 2022 - 7.9K bytes - Viewed (0) -
pkg/test/framework/components/namespace/kube.go
kube2 "istio.io/istio/pkg/test/kube" "istio.io/istio/pkg/test/scopes" "istio.io/istio/pkg/test/util/retry" ) // nolint: gosec // Test only code var ( idctr int64 rnd = rand.New(rand.NewSource(time.Now().UnixNano())) mu sync.Mutex ) // kubeNamespace represents a Kubernetes namespace. It is tracked as a resource. type kubeNamespace struct { ctx resource.Context id resource.ID
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 06 22:12:34 UTC 2024 - 9K bytes - Viewed (0) -
src/syscall/exec_unix_test.go
// and we are going to call syscall.Exec anyhow. os.Setenv("GO_WANT_HELPER_PROCESS", "3") stop := time.Now().Add(time.Second) for i := 0; i < 100; i++ { go func(i int) { r := rand.New(rand.NewSource(int64(i))) for time.Now().Before(stop) { r.Uint64() } }(i) } time.Sleep(10 * time.Millisecond) argv := []string{os.Args[0], "-test.run=^TestExecHelper$"}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 22 04:41:27 UTC 2024 - 7.9K bytes - Viewed (0)