Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 162 for newResource (0.55 sec)

  1. cmd/erasure-server-pool-rebalance.go

    	go func() {
    		// Update rebalance.bin periodically once every 5-10s, chosen randomly
    		// to avoid multiple pool leaders herding to update around the same
    		// time.
    		r := rand.New(rand.NewSource(time.Now().UnixNano()))
    		randSleepFor := func() time.Duration {
    			return 5*time.Second + time.Duration(float64(5*time.Second)*r.Float64())
    		}
    
    		timer := time.NewTimer(randSleepFor())
    		defer timer.Stop()
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 03 15:45:54 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  2. src/math/big/arith_test.go

    		arg = argVV{a.y, a.z, a.x, a.c}
    		testFunVV(t, "subVV_g symmetric", subVV_g, arg)
    		testFunVV(t, "subVV symmetric", subVV, arg)
    	}
    }
    
    // Always the same seed for reproducible results.
    var rnd = rand.New(rand.NewSource(0))
    
    func rndW() Word {
    	return Word(rnd.Int63()<<1 | rnd.Int63n(2))
    }
    
    func rndV(n int) []Word {
    	v := make([]Word, n)
    	for i := range v {
    		v[i] = rndW()
    	}
    	return v
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 02 14:43:52 UTC 2022
    - 19.9K bytes
    - Viewed (0)
  3. cmd/batch-handlers.go

    	if ri.Complete {
    		return nil
    	}
    	globalBatchJobsMetrics.save(job.ID, ri)
    
    	delay := job.Replicate.Flags.Retry.Delay
    	if delay == 0 {
    		delay = batchReplJobDefaultRetryDelay
    	}
    	rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	hasTags := len(r.Flags.Filter.Tags) != 0
    	isMetadata := len(r.Flags.Filter.Metadata) != 0
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 03:13:30 UTC 2024
    - 56K bytes
    - Viewed (0)
  4. src/context/x_test.go

    }
    
    func TestLayersTimeout(t *testing.T) {
    	testLayers(t, time.Now().UnixNano(), true)
    }
    
    func testLayers(t *testing.T, seed int64, testTimeout bool) {
    	t.Parallel()
    
    	r := rand.New(rand.NewSource(seed))
    	prefix := fmt.Sprintf("seed=%d", seed)
    	errorf := func(format string, a ...any) {
    		t.Errorf(prefix+format, a...)
    	}
    	const (
    		minLayers = 30
    	)
    	type value int
    	var (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/handler_test.go

    	waitGroup := sync.WaitGroup{}
    
    	// Spawn a bunch of writers that randomly add groups, remove groups, and
    	// reset the list of groups
    	for i := 0; i < numWriters; i++ {
    		source := rand.NewSource(int64(i))
    
    		waitGroup.Add(1)
    		go func() {
    			defer waitGroup.Done()
    
    			// track list of groups we've added so that we can remove them
    			// randomly
    			var addedGroups []metav1.GroupVersion
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 02 00:29:39 UTC 2024
    - 28.6K bytes
    - Viewed (0)
  6. src/compress/flate/deflate_test.go

    	// seen in https://github.com/golang/go/issues/4142
    	enc := newDeflateFast()
    
    	// testData may not generate internal matches.
    	testData := make([]byte, 32)
    	rng := rand.New(rand.NewSource(0))
    	for i := range testData {
    		testData[i] = byte(rng.Uint32())
    	}
    
    	// Encode the testdata with clean state.
    	// Second part should pick up matches from the first block.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.6K bytes
    - Viewed (0)
  7. cmd/metacache-entries_test.go

    			wantSelected: &inputSerialized[9],
    			wantOk:       true,
    		},
    	}
    
    	for testID, tt := range tests {
    		rng := rand.New(rand.NewSource(0))
    		// Run for a number of times, shuffling the input to ensure that output is consistent.
    		for i := 0; i < 10; i++ {
    			t.Run(fmt.Sprintf("test-%d-%s-run-%d", testID, tt.name, i), func(t *testing.T) {
    				if i > 0 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 31.6K bytes
    - Viewed (0)
  8. cmd/iam.go

    	sys.initStore(objAPI, etcdClient)
    	sys.Unlock()
    
    	retryCtx, cancel := context.WithCancel(ctx)
    
    	// Indicate to our routine to exit cleanly upon return.
    	defer cancel()
    
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	// Migrate storage format if needed.
    	for {
    		// Migrate IAM configuration, if necessary.
    		if err := saveIAMFormat(retryCtx, sys.store); err != nil {
    			if configRetriableErrors(err) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 71.9K bytes
    - Viewed (0)
  9. cmd/erasure-server-pool-decom.go

    		go func() {
    			// Resume decommissioning of pools, but wait 3 minutes for cluster to stabilize.
    			if err := sleepContext(ctx, 3*time.Minute); err != nil {
    				return
    			}
    			r := rand.New(rand.NewSource(time.Now().UnixNano()))
    			for {
    				if err := z.Decommission(ctx, poolIndices...); err != nil {
    					if errors.Is(err, errDecommissionAlreadyRunning) {
    						// A previous decommission running found restart it.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 06 14:30:43 UTC 2024
    - 41.5K bytes
    - Viewed (1)
  10. cmd/xl-storage-disk-id-check.go

    		if skipIfSuccessBefore <= 0 {
    			skipIfSuccessBefore = globalDriveConfig.GetMaxTimeout()
    		}
    	}
    
    	t := time.NewTicker(checkEvery)
    	defer t.Stop()
    	fn := mustGetUUID()
    
    	rng := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	monitor := func() bool {
    		if contextCanceled(ctx) {
    			return false
    		}
    
    		if p.health.status.Load() != diskHealthOK {
    			return true
    		}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 33.4K bytes
    - Viewed (0)
Back to top