mirror of
https://github.com/hanzoai/oxy.git
synced 2026-09-30 23:42:31 +00:00
Add counter window size
This commit is contained in:
@@ -98,6 +98,10 @@ func NewRTMetrics(settings ...rrOptSetter) (*RTMetrics, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (m *RTMetrics) CounterWindowSize() time.Duration {
|
||||
return m.total.WindowSize()
|
||||
}
|
||||
|
||||
// GetNetworkErrorRatio calculates the amont of network errors such as time outs and dropped connection
|
||||
// that occured in the given time window compared to the total requests count.
|
||||
func (m *RTMetrics) NetworkErrorRatio() float64 {
|
||||
|
||||
Reference in New Issue
Block a user