- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for Int63n (0.09 sec)
-
cmd/erasure-decode_test.go
r := rand.New(rand.NewSource(UTCNow().UnixNano())) buf := &bytes.Buffer{} // Verify erasure.Decode() for random offsets and lengths. for i := 0; i < iterations; i++ { offset := r.Int63n(length) readLen := r.Int63n(length - offset) expected := data[offset : offset+readLen] // Get the checksums of the current part. bitrotReaders := make([]io.ReaderAt, len(disks)) for index, disk := range disks {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 21.1K bytes - Viewed (0) -
cmd/bootstrap-peer-server.go
select { case <-ctx.Done(): return ctx.Err() default: // Sleep and stagger to avoid blocked CPU and thundering // herd upon start up sequence. time.Sleep(25*time.Millisecond + time.Duration(rand.Int63n(int64(100*time.Millisecond)))) retries++ // after 20 retries start logging that servers are not reachable yet if retries >= 20 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 8.4K bytes - Viewed (0) -
cmd/bucket-metadata-sys.go
for index := range buckets { index := index g.Go(func() error { // Sleep and stagger to avoid blocked CPU and thundering // herd upon start up sequence. time.Sleep(25*time.Millisecond + time.Duration(rand.Int63n(int64(100*time.Millisecond)))) _, _ = sys.objAPI.HealBucket(ctx, buckets[index], madmin.HealOpts{Recreate: true}) meta, err := loadBucketMetadata(ctx, sys.objAPI, buckets[index]) if err != nil { return err
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 28 15:32:18 UTC 2024 - 20.4K bytes - Viewed (0) -
cmd/data-usage-cache.go
break } retry, err = load(name+".bkp", 30*time.Second) if err == nil && !retry { // Only return when we have valid data from the backup break } retries++ time.Sleep(time.Duration(rand.Int63n(int64(time.Second)))) } if retries == 5 { scannerLogOnceIf(ctx, fmt.Errorf("maximum retry reached to load the data usage cache `%s`", name), "retry-loading-data-usage-cache") } return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 34.7K bytes - Viewed (0) -
cmd/xl-storage-disk-id-check.go
p.health.waiting.Add(1) go p.monitorDiskStatus(spent, fn) } } // Offset checks a bit. time.Sleep(time.Duration(rng.Int63n(int64(1 * time.Second)))) dctx, dcancel := context.WithCancel(ctx) started := time.Now() go func() { timeout := time.NewTimer(globalDriveConfig.GetMaxTimeout()) select {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:56:26 UTC 2024 - 34.5K bytes - Viewed (0) -
cmd/bucket-replication.go
cancel() if err == nil { break } if minio.ToErrorResponse(err).Code == "PreconditionFailed" { return nil } attempts++ time.Sleep(time.Duration(rand.Int63n(int64(time.Second)))) } if err != nil { return err } defer func() { if err != nil { // block and abort remote upload upon failure. attempts := 1 for attempts <= 3 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 06:49:55 UTC 2024 - 116.1K bytes - Viewed (0) -
internal/grid/connection.go
c.connMu.Unlock() retry := func(err error) { if debugPrint { fmt.Printf("%v Connecting to %v: %v. Retrying.\n", c.Local, c.Remote, err) } sleep := defaultDialTimeout + time.Duration(rng.Int63n(int64(defaultDialTimeout))) next := dialStarted.Add(sleep / 2) sleep = time.Until(next).Round(time.Millisecond) if sleep < 0 { sleep = 0 } gotState := c.State()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 46.7K bytes - Viewed (0) -
api/go1.22.txt
pkg math/rand/v2, func Int() int #61716 pkg math/rand/v2, func Int32() int32 #61716 pkg math/rand/v2, func Int32N(int32) int32 #61716 pkg math/rand/v2, func Int64() int64 #61716 pkg math/rand/v2, func Int64N(int64) int64 #61716 pkg math/rand/v2, func IntN(int) int #61716 pkg math/rand/v2, func N[$0 intType]($0) $0 #61716 pkg math/rand/v2, func New(Source) *Rand #61716 pkg math/rand/v2, func NewChaCha8([32]uint8) *ChaCha8 #61716
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Jan 24 20:54:27 UTC 2024 - 7.7K bytes - Viewed (0) -
cmd/test-utils_test.go
var src = rand.NewSource(time.Now().UnixNano()) func randString(n int) string { b := make([]byte, n) // A src.Int63() generates 63 random bits, enough for letterIdxMax characters! for i, cache, remain := n-1, src.Int63(), letterIdxMax; i >= 0; { if remain == 0 { cache, remain = src.Int63(), letterIdxMax } if idx := int(cache & letterIdxMask); idx < len(letterBytes) { b[i] = letterBytes[idx] i--
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 77K bytes - Viewed (0) -
cmd/object-api-utils.go
// 4 MB block. // Approx runtime ~30ms data := make([]byte, 4<<20) rng := rand.New(rand.NewSource(0)) for i := range data { // Generate compressible stream... data[i] = byte(rng.Int63() & 3) } failOnErr := func(err error) { if err != nil { logger.Fatal(errSelfTestFailure, "compress: error on self-test: %v", err) } } const skip = 2<<20 + 511
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 37.1K bytes - Viewed (0)