- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for Int63n (0.15 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) -
internal/dsync/locked_rand.go
type lockedRandSource struct { lk sync.Mutex src rand.Source } // Int63 returns a non-negative pseudo-random 63-bit integer as an int64. func (r *lockedRandSource) Int63() (n int64) { r.lk.Lock() n = r.src.Int63() r.lk.Unlock() return } // Seed uses the provided seed value to initialize the generator to a // deterministic state.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Oct 18 15:39:59 UTC 2021 - 1.3K 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) -
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
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Dec 21 05:25:57 UTC 2016 - 16.3K bytes - Viewed (0)