- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for newBucketMeasurement (0.11 sec)
-
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.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Jun 03 20:41:51 UTC 2023 - 2.9K bytes - Viewed (0) -
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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 06 03:21:59 UTC 2023 - 4.3K bytes - Viewed (0) -
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 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 19 22:54:46 UTC 2024 - 6K bytes - Viewed (0)