Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for newBucketMeasurement (0.21 sec)

  1. internal/bucket/bandwidth/measurement.go

    	startTime            time.Time // Start time for window
    	expMovingAvg         float64   // Previously calculate sliding window
    }
    
    // newBucketMeasurement creates a new instance of the measurement with the initial start time.
    func newBucketMeasurement(initTime time.Time) *bucketMeasurement {
    	return &bucketMeasurement{
    		startTime: initTime,
    	}
    }
    
    // incrementBytes add bytes reported for a bucket.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Jun 03 20:41:51 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  2. internal/bucket/bandwidth/monitor_test.go

    		activeBuckets map[BucketOptions]*bucketMeasurement
    		endTime       time.Time
    		update2       uint64
    		endTime2      time.Time
    	}
    	start := time.Now()
    	m0 := newBucketMeasurement(start)
    	m0.incrementBytes(0)
    	m1MiBPS := newBucketMeasurement(start)
    	m1MiBPS.incrementBytes(oneMiB)
    
    	test1Want := make(map[BucketOptions]Details)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Sep 06 03:21:59 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. internal/bucket/bandwidth/monitor.go

    	}
    }
    
    func (m *Monitor) init(opts BucketOptions) {
    	m.mlock.Lock()
    	defer m.mlock.Unlock()
    
    	_, ok := m.bucketsMeasurement[opts]
    	if !ok {
    		m.bucketsMeasurement[opts] = newBucketMeasurement(time.Now())
    	}
    }
    
    // DeleteBucket deletes monitoring the 'bucket'
    func (m *Monitor) DeleteBucket(bucket string) {
    	m.tlock.Lock()
    	for opts := range m.bucketsThrottle {
    		if opts.Name == bucket {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 6K bytes
    - Viewed (0)
Back to top