- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 101 for floats (0.13 sec)
-
cmd/license-update.go
// take over because of this loop. for { licenceUpdaterLoop(ctx, objAPI) // license update stopped for some reason. // sleep for some time and try again. duration := time.Duration(r.Float64() * float64(time.Hour)) if duration < time.Second { // Make sure to sleep at least a second to avoid high CPU ticks. duration = time.Second } time.Sleep(duration) } }() }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 3.3K bytes - Viewed (0) -
cmd/iam.go
waitInterval := func() time.Duration { // Calculate a random value such that 0 <= value < baseInterval randAmt := time.Duration(r.Float64() * float64(baseInterval)) return baseInterval/2 + randAmt } var maxDurationSecondsForLog float64 = 5 timer := time.NewTimer(waitInterval()) defer timer.Stop() for { select { case <-timer.C:
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) -
cmd/erasure-server-pool.go
err = z.Init(ctx) // Initializes all pools. }) if err != nil { if !configRetriableErrors(err) { logger.Fatal(err, "Unable to initialize backend") } retry := time.Duration(r.Float64() * float64(5*time.Second)) storageLogIf(ctx, fmt.Errorf("Unable to initialize backend: %w, retrying in %s", err, retry)) time.Sleep(retry) attempt++ continue } break } return z, nil
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri May 03 20:08:20 GMT 2024 - 80.5K bytes - Viewed (0) -
cmd/batch-rotate.go
} if r.Flags.Filter.NewerThan > 0 && time.Since(info.ModTime) >= r.Flags.Filter.NewerThan { // skip all objects that are older than specified newer duration return false } if !r.Flags.Filter.CreatedAfter.IsZero() && r.Flags.Filter.CreatedAfter.Before(info.ModTime) { // skip all objects that are created before the specified time. return false }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 14.2K bytes - Viewed (0) -
docs/debugging/pprofgoparser/main.go
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Mar 06 11:43:16 GMT 2024 - 3.4K bytes - Viewed (0) -
cmd/metrics-resource.go
Labels map[string]string // value captured in current cycle Current float64 // Used when system provides cumulative (since uptime) values // helps in calculating the current value by comparing the new // cumulative value with previous one Cumulative float64 Max float64 Avg float64 Sum float64 Count uint64 } func init() {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 23 23:56:12 GMT 2024 - 17.4K bytes - Viewed (0) -
internal/bucket/bandwidth/measurement.go
m.expMovingAvg = float64(bytesSinceLastWindow) / duration.Seconds() return } increment := float64(bytesSinceLastWindow) / duration.Seconds() m.expMovingAvg = exponentialMovingAverage(betaBucket, m.expMovingAvg, increment) } // exponentialMovingAverage calculates the exponential moving average func exponentialMovingAverage(beta, previousAvg, incrementAvg float64) float64 {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sat Jun 03 20:41:51 GMT 2023 - 2.9K bytes - Viewed (0) -
internal/bucket/bandwidth/reader.go
r.opts.HeaderSize = 0 need = int(math.Min(float64(b-hdr), float64(need))) // use remaining tokens towards payload tokens = need + hdr } else { // part of header can be accommodated r.opts.HeaderSize -= b - 1 need = 1 // to ensure we read at least one byte for every Read tokens = b } } else { // all tokens go towards payload need = int(math.Min(float64(b), float64(need))) tokens = need }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Sep 06 03:21:59 GMT 2023 - 3.1K bytes - Viewed (0) -
cmd/dynamic-timeouts_test.go
wg.Add(1) rng := rand.New(rand.NewSource(int64(i))) go func() { defer wg.Done() for i := 0; i < 100; i++ { for j := 0; j < 100; j++ { timeout.LogSuccess(time.Duration(float64(time.Second) * rng.Float64())) } to := timeout.Timeout() if to < time.Millisecond || to > time.Second { panic(to) } } }() } wg.Wait() }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Oct 14 10:08:40 GMT 2022 - 5.4K 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 May 05 19:28:20 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 2022 - 11K bytes - Viewed (0)