- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for updateMeasurement (0.08 sec)
-
internal/bucket/bandwidth/reader.go
} err = r.throttle.WaitN(r.ctx, tokens) if err != nil { return } n, err = r.r.Read(buf[:need]) if err != nil { r.lastErr = err return } r.m.updateMeasurement(r.opts.BucketOptions, uint64(tokens)) return } // NewMonitoredReader returns reference to a monitored reader that throttles reads to configured bandwidth for the // bucket.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 14:57:31 UTC 2024 - 3.2K bytes - Viewed (0) -
internal/bucket/bandwidth/monitor.go
bucketMovingAvgTicker: time.NewTicker(2 * time.Second), ctx: ctx, NodeCount: numNodes, } go m.trackEWMA() return m } func (m *Monitor) updateMeasurement(opts BucketOptions, bytes uint64) { m.mlock.Lock() defer m.mlock.Unlock() tm, ok := m.bucketsMeasurement[opts] if !ok { tm = &bucketMeasurement{} } tm.incrementBytes(bytes)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 19 22:54:46 UTC 2024 - 6K bytes - Viewed (0)