Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for updateExponentialMovingAverage (0.35 sec)

  1. internal/bucket/bandwidth/monitor_test.go

    			m := &Monitor{
    				bucketsMeasurement: tt.fields.activeBuckets,
    				bucketsThrottle:    th,
    				NodeCount:          1,
    			}
    			m.bucketsMeasurement[BucketOptions{Name: "bucket", ReplicationARN: "arn"}].updateExponentialMovingAverage(tt.fields.endTime)
    			got := m.GetReport(SelectBuckets())
    			if !reflect.DeepEqual(got, tt.want) {
    				t.Errorf("GetReport() = %v, want %v", got, tt.want)
    			}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  2. internal/bucket/bandwidth/measurement.go

    func (m *bucketMeasurement) incrementBytes(bytes uint64) {
    	atomic.AddUint64(&m.bytesSinceLastWindow, bytes)
    }
    
    // updateExponentialMovingAverage processes the measurements captured so far.
    func (m *bucketMeasurement) updateExponentialMovingAverage(endTime time.Time) {
    	// Calculate aggregate avg bandwidth and exp window avg
    	m.lock.Lock()
    	defer func() {
    		m.startTime = endTime
    		m.lock.Unlock()
    	}()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Jun 03 20:41:51 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  3. cmd/site-replication-metrics.go

    			return
    		}
    	}
    }
    
    func (sr *SRStats) updateMovingAvg() {
    	sr.lock.Lock()
    	defer sr.lock.Unlock()
    	for _, s := range sr.M {
    		s.XferRateLrg.measure.updateExponentialMovingAverage(time.Now())
    		s.XferRateSml.measure.updateExponentialMovingAverage(time.Now())
    	}
    }
    
    // SRMetric captures replication metrics for a deployment
    type SRMetric struct {
    	DeploymentID  string             `json:"deploymentID"`
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  4. cmd/bucket-replication-stats.go

    		}
    	}
    }
    
    func (r *ReplicationStats) updateMovingAvg() {
    	r.RLock()
    	for _, s := range r.Cache {
    		for _, st := range s.Stats {
    			st.XferRateLrg.measure.updateExponentialMovingAverage(time.Now())
    			st.XferRateSml.measure.updateExponentialMovingAverage(time.Now())
    		}
    	}
    	r.RUnlock()
    }
    
    // ActiveWorkers returns worker stats
    func (r *ReplicationStats) ActiveWorkers() ActiveWorkerStat {
    	r.wlock.RLock()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  5. internal/bucket/bandwidth/monitor.go

    			return
    		}
    	}
    }
    
    func (m *Monitor) updateMovingAvg() {
    	m.mlock.Lock()
    	defer m.mlock.Unlock()
    	for _, bucketMeasurement := range m.bucketsMeasurement {
    		bucketMeasurement.updateExponentialMovingAverage(time.Now())
    	}
    }
    
    func (m *Monitor) init(opts BucketOptions) {
    	m.mlock.Lock()
    	defer m.mlock.Unlock()
    
    	_, ok := m.bucketsMeasurement[opts]
    	if !ok {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. cmd/bucket-replication-metrics.go

    func (m *rateMeasurement) incrementBytes(bytes uint64) {
    	atomic.AddUint64(&m.bytesSinceLastWindow, bytes)
    }
    
    // updateExponentialMovingAverage processes the measurements captured so far.
    func (m *rateMeasurement) updateExponentialMovingAverage(endTime time.Time) {
    	// Calculate aggregate avg bandwidth and exp window avg
    	m.lock.Lock()
    	defer func() {
    		m.startTime = endTime
    		m.lock.Unlock()
    	}()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 06 06:00:45 GMT 2024
    - 14.2K bytes
    - Viewed (0)
Back to top