- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 42 for NewSource (0.09 sec)
-
internal/rest/client.go
if c.HealthCheckFn != nil && atomic.CompareAndSwapInt32(&c.connected, online, offline) { go func() { backOff := exponentialBackoffWait( rand.New(rand.NewSource(time.Now().UnixNano())), 200*time.Millisecond, 30*time.Second, ) attempt := uint(0) for { if atomic.LoadInt32(&c.connected) == closed { return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 14.7K bytes - Viewed (0) -
cmd/metacache-entries_test.go
wantSelected: &inputSerialized[9], wantOk: true, }, } for testID, tt := range tests { rng := rand.New(rand.NewSource(0)) // Run for a number of times, shuffling the input to ensure that output is consistent. for i := 0; i < 10; i++ { t.Run(fmt.Sprintf("test-%d-%s-run-%d", testID, tt.name, i), func(t *testing.T) { if i > 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 31.6K bytes - Viewed (0) -
cmd/xl-storage-format_test.go
} // Encode all. This is used for benchmarking. enc, err := xl.AppendTo(nil) if err != nil { b.Fatal(err) } b.Logf("Serialized size: %d bytes", len(enc)) rng := rand.New(rand.NewSource(0)) dump := make([]byte, len(enc)) b.Run("UpdateObjectVersion", func(b *testing.B) { b.SetBytes(int64(size)) b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { // Load...
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 17.6K bytes - Viewed (0) -
cmd/xl-storage-format-v2_test.go
t.Run(test.name, func(t *testing.T) { // Run multiple times, shuffling the input order. for i := int64(0); i < 50; i++ { t.Run(fmt.Sprint(i), func(t *testing.T) { rng := rand.New(rand.NewSource(i)) rng.Shuffle(len(test.input), func(i, j int) { test.input[i], test.input[j] = test.input[j], test.input[i] }) got := mergeXLV2Versions(test.quorum, true, 0, test.input...)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Mar 08 17:50:48 UTC 2024 - 36.4K bytes - Viewed (0) -
cmd/erasure-decode_test.go
if err != nil { t.Fatal(err) } if n != length { t.Errorf("erasureCreateFile returned %d, expected %d", n, length) } // To generate random offset/length. 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)
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/object-api-utils_test.go
b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { concat(data...) } }) } func BenchmarkConcatImplementation(b *testing.B) { data := make([]string, 2) rng := rand.New(rand.NewSource(0)) for i := 0; i < 2; i++ { var tmp [16]byte rng.Read(tmp[:]) data[i] = hex.EncodeToString(tmp[:]) } b.ResetTimer() benchmark(b, data) } func BenchmarkPathJoinOld(b *testing.B) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 24.1K bytes - Viewed (0) -
internal/dsync/drwmutex.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 15:49:49 UTC 2024 - 20.4K bytes - Viewed (0) -
cmd/erasure-server-pool-rebalance.go
go func() { // Update rebalance.bin periodically once every 5-10s, chosen randomly // to avoid multiple pool leaders herding to update around the same // time. r := rand.New(rand.NewSource(time.Now().UnixNano())) randSleepFor := func() time.Duration { return 5*time.Second + time.Duration(float64(5*time.Second)*r.Float64()) } timer := time.NewTimer(randSleepFor()) defer timer.Stop()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 13:20:19 UTC 2024 - 28.4K bytes - Viewed (0) -
cmd/iam.go
sys.initStore(objAPI, etcdClient) sys.Unlock() retryCtx, cancel := context.WithCancel(ctx) // Indicate to our routine to exit cleanly upon return. defer cancel() r := rand.New(rand.NewSource(time.Now().UnixNano())) // Migrate storage format if needed. for { // Migrate IAM configuration, if necessary. if err := saveIAMFormat(retryCtx, sys.store); err != nil { if configRetriableErrors(err) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 29 16:01:48 UTC 2024 - 74.6K bytes - Viewed (0) -
cmd/xl-storage-disk-id-check.go
if skipIfSuccessBefore <= 0 { skipIfSuccessBefore = globalDriveConfig.GetMaxTimeout() } } t := time.NewTicker(checkEvery) defer t.Stop() fn := mustGetUUID() rng := rand.New(rand.NewSource(time.Now().UnixNano())) monitor := func() bool { if contextCanceled(ctx) { return false } if p.health.status.Load() != diskHealthOK { return true }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:56:26 UTC 2024 - 34.5K bytes - Viewed (0)