Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for LogSuccess (0.18 sec)

  1. cmd/dynamic-timeouts_test.go

    	timeout := newDynamicTimeout(time.Minute, time.Second)
    
    	initial := timeout.Timeout()
    
    	for i := 0; i < dynamicTimeoutLogSize; i++ {
    		timeout.LogSuccess(20 * time.Second)
    	}
    
    	adjusted := timeout.Timeout()
    
    	for i := 0; i < dynamicTimeoutLogSize; i++ {
    		timeout.LogSuccess(20 * time.Second)
    	}
    
    	adjustedAgain := timeout.Timeout()
    
    	if initial <= adjusted || adjusted <= adjustedAgain {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Oct 14 10:08:40 GMT 2022
    - 5.4K bytes
    - Viewed (0)
  2. cmd/namespace-lock.go

    		defer cancel()
    		if err := newCtx.Err(); err == context.Canceled {
    			return LockContext{ctx: ctx, cancel: func() {}}, err
    		}
    		return LockContext{ctx: ctx, cancel: func() {}}, OperationTimedOut{}
    	}
    	timeout.LogSuccess(UTCNow().Sub(start))
    	return LockContext{ctx: newCtx, cancel: cancel}, nil
    }
    
    // Unlock - block until write lock is released.
    func (di *distLockInstance) Unlock(lc LockContext) {
    	if lc.cancel != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  3. cmd/dynamic-timeouts.go

    	return time.Duration(atomic.LoadInt64(&dt.timeout))
    }
    
    func (dt *dynamicTimeout) RetryInterval() time.Duration {
    	return dt.retryInterval
    }
    
    // LogSuccess logs the duration of a successful action that
    // did not hit the timeout
    func (dt *dynamicTimeout) LogSuccess(duration time.Duration) {
    	dt.logEntry(duration)
    }
    
    // LogFailure logs an action that hit the timeout
    func (dt *dynamicTimeout) LogFailure() {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Aug 19 23:21:05 GMT 2022
    - 4.5K bytes
    - Viewed (0)
  4. cmd/xl-storage-disk-id-check.go

    	d := diskHealthTracker{
    		lastSuccess: time.Now().UnixNano(),
    		lastStarted: time.Now().UnixNano(),
    	}
    	d.status.Store(diskHealthOK)
    	return &d
    }
    
    // logSuccess will update the last successful operation time.
    func (d *diskHealthTracker) logSuccess() {
    	atomic.StoreInt64(&d.lastSuccess, time.Now().UnixNano())
    }
    
    func (d *diskHealthTracker) isFaulty() bool {
    	return d.status.Load() == diskHealthFaulty
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 32.7K bytes
    - Viewed (0)
  5. cmd/tier_test.go

    )
    
    func TestTierMetrics(t *testing.T) {
    	tier := "WARM-1"
    	globalTierMetrics.Observe(tier, 200*time.Millisecond)
    	expSuccess := 10
    	expFailure := 5
    	for i := 0; i < expSuccess; i++ {
    		globalTierMetrics.logSuccess(tier)
    	}
    	for i := 0; i < expFailure; i++ {
    		globalTierMetrics.logFailure(tier)
    	}
    	metrics := globalTierMetrics.Report()
    	var succ, fail float64
    	for _, metric := range metrics {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Dec 21 04:13:40 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  6. cmd/tier.go

    	}, []string{"tier"}),
    }
    
    func (t *tierMetrics) Observe(tier string, dur time.Duration) {
    	t.histogram.With(prometheus.Labels{"tier": tier}).Observe(dur.Seconds())
    }
    
    func (t *tierMetrics) logSuccess(tier string) {
    	t.Lock()
    	defer t.Unlock()
    
    	stat := t.requestsCount[tier]
    	stat.success++
    	t.requestsCount[tier] = stat
    }
    
    func (t *tierMetrics) logFailure(tier string) {
    	t.Lock()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  7. cmd/bucket-lifecycle.go

    			OutputBytes: bytes,
    		}
    
    		if err == nil {
    			since := time.Since(startTime)
    			op.TimeToResponseNS = since.Nanoseconds()
    			globalTierMetrics.Observe(tier, since)
    			globalTierMetrics.logSuccess(tier)
    		} else {
    			op.Error = err.Error()
    			globalTierMetrics.logFailure(tier)
    		}
    
    		logger.GetReqInfo(ctx).AppendTags("tierStats", op)
    	}
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
Back to top