Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for logSuccess (0.16 sec)

  1. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 33K bytes
    - Viewed (0)
  2. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Thu Dec 21 04:13:40 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  3. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  4. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 33.1K bytes
    - Viewed (0)
Back to top