Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 15 of 15 for IntN (0.17 sec)

  1. cmd/test-utils_test.go

    // fetches a random number between range min-max.
    func getRandomRange(min, max int, seed int64) int {
    	// special value -1 means no explicit seeding.
    	if seed != -1 {
    		rand.Seed(seed)
    	}
    	return rand.Intn(max-min) + min
    }
    
    // Randomizes the order of bytes in the byte array
    // using Knuth Fisher-Yates shuffle algorithm.
    func randomizeBytes(s []byte, seed int64) []byte {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
  2. cmd/object-api-utils.go

    	rng := rand.New(rand.NewSource(time.Now().UTC().UnixNano()))
    	var d net.Dialer
    	var retry int
    	for retry < len(hosts) {
    		ctx, cancel := context.WithTimeout(GlobalContext, 300*time.Millisecond)
    
    		host = hosts[rng.Intn(len(hosts))]
    		conn, err := d.DialContext(ctx, "tcp", host)
    		cancel()
    		if err != nil {
    			retry++
    			continue
    		}
    		conn.Close()
    		break
    	}
    
    	return host
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  3. cmd/iam.go

    					logger.Info("IAM expired STS purge took %.2fs", took)
    				}
    			}
    
    			// The following actions are performed about once in 4 times that
    			// IAM is refreshed:
    			if r.Intn(4) == 0 {
    				// Poll and remove accounts for those users who were removed
    				// from LDAP/OpenID.
    				if sys.LDAPConfig.Enabled() {
    					sys.purgeExpiredCredentialsForLDAP(ctx)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 21:28:16 GMT 2024
    - 71.1K bytes
    - Viewed (1)
  4. cmd/object-api-multipart_test.go

    		t.Fatalf("%s : %s", instanceType, err.Error())
    	}
    
    	z := obj.(*erasureServerPools)
    	er := z.serverPools[0].sets[0]
    
    	erasureDisks := er.getDisks()
    	ridx := rand.Intn(len(erasureDisks))
    
    	z.serverPools[0].erasureDisksMu.Lock()
    	er.getDisks = func() []StorageAPI {
    		erasureDisks[ridx] = newNaughtyDisk(erasureDisks[ridx], nil, errFaultyDisk)
    		return erasureDisks
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 77.1K bytes
    - Viewed (0)
  5. api/go1.txt

    pkg math/rand, func Int() int
    pkg math/rand, func Int31() int32
    pkg math/rand, func Int31n(int32) int32
    pkg math/rand, func Int63() int64
    pkg math/rand, func Int63n(int64) int64
    pkg math/rand, func Intn(int) int
    pkg math/rand, func New(Source) *Rand
    pkg math/rand, func NewSource(int64) Source
    pkg math/rand, func NewZipf(*Rand, float64, float64, uint64) *Zipf
    pkg math/rand, func NormFloat64() float64
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
Back to top