- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 3,876 for rand (0.26 sec)
-
internal/s3select/select_benchmark_test.go
package s3select import ( "bytes" "encoding/csv" "math/rand" "net/http" "strconv" "testing" "time" humanize "github.com/dustin/go-humanize" ) const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" func newRandString(length int) string { randSrc := rand.New(rand.NewSource(time.Now().UnixNano())) b := make([]byte, length) for i := range b {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 14 13:54:47 GMT 2022 - 5K bytes - Viewed (0) -
internal/dsync/utils.go
package dsync import ( "math/rand" "time" ) func backoffWait(min, unit, cap time.Duration) func(*rand.Rand, uint) time.Duration { if unit > time.Hour { // Protect against integer overflow panic("unit cannot exceed one hour") } return func(r *rand.Rand, attempt uint) time.Duration { sleep := min sleep += unit * time.Duration(attempt)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat May 13 15:42:21 GMT 2023 - 1.2K bytes - Viewed (0) -
internal/dsync/dsync_test.go
dm := NewDRWMutex(ds, "test") dm.Lock(id, source) time.Sleep(time.Duration(10+(rand.Float32()*50)) * time.Millisecond) dm.Unlock(context.Background()) dm.Lock(id, source) time.Sleep(time.Duration(10+(rand.Float32()*50)) * time.Millisecond) dm.Unlock(context.Background()) dm.Lock(id, source) time.Sleep(time.Duration(10+(rand.Float32()*50)) * time.Millisecond) dm.Unlock(context.Background()) dm.Lock(id, source)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 2022 - 11K bytes - Viewed (0) -
cmd/local-locker_test.go
} if len(l.lockUID) != 0 { t.Fatalf("lockUID len, got %d, want %d + %d", len(l.lockUID), 0, 0) } } func Test_localLocker_expireOldLocksExpire(t *testing.T) { rng := rand.New(rand.NewSource(0)) // Numbers of unique locks for _, locks := range []int{100, 1000, 1e6} { if testing.Short() && locks > 100 { continue } t.Run(fmt.Sprintf("%d-locks", locks), func(t *testing.T) {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sun Mar 05 04:57:35 GMT 2023 - 11.8K bytes - Viewed (0) -
cmd/erasure-common.go
package cmd import ( "context" "fmt" "io" "math/rand" "sync" "time" "github.com/minio/pkg/v2/sync/errgroup" ) func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) { disks := er.getDisks() var wg sync.WaitGroup var mu sync.Mutex r := rand.New(rand.NewSource(time.Now().UnixNano())) for _, i := range r.Perm(len(disks)) { i := i wg.Add(1)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 4.6K bytes - Viewed (0) -
api/go1.8.txt
pkg math/big, method (*Int) Sqrt(*Int) *Int pkg math/rand, func Uint64() uint64 pkg math/rand, method (*Rand) Uint64() uint64 pkg math/rand, type Source64 interface, Int63() int64 pkg math/rand, type Source64 interface { Int63, Seed, Uint64 } pkg math/rand, type Source64 interface, Seed(int64) pkg math/rand, type Source64 interface, Uint64() uint64 pkg net/http, const TrailerPrefix ideal-string
Plain Text - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Dec 21 05:25:57 GMT 2016 - 16.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashTestUtils.java
* input bit(i) and output bit(j), two pairs of keys must be found with all bits identical except * bit(i). One pair must differ in output bit(j), and one pair must not. This proves that input * bit(i) can alter output bit(j). */ static void checkNoFunnels(HashFunction function) { Random rand = new Random(0); int keyBits = 32; int hashBits = function.bits();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 25.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[:])
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 7.4K bytes - Viewed (0) -
cmd/site-replication-utils.go
peerResyncMap: make(map[string]resyncState), } go s.save(ctx) go s.init(ctx) return &s } // init site resync metrics func (sm *siteResyncMetrics) init(ctx context.Context) { r := rand.New(rand.NewSource(time.Now().UnixNano())) // Run the site resync metrics load in a loop for { if err := sm.load(ctx, newObjectLayerFn()); err == nil { <-ctx.Done() return }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 8.9K bytes - Viewed (1) -
internal/http/dial_dnscache.go
// // You can use returned dial function for `http.Transport.DialContext`. // // In this function, it uses functions from `rand` package. To make it really random, // you MUST call `rand.Seed` and change the value from the default in your application func DialContextWithLookupHost(lookupHost LookupHost, baseDialCtx DialContext) DialContext { if lookupHost == nil { lookupHost = net.DefaultResolver.LookupHost }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Jul 03 19:30:51 GMT 2023 - 2.6K bytes - Viewed (0)