Add counter window size

This commit is contained in:
Alexander Klizhentas
2014-12-15 09:27:28 -08:00
parent 0e2c16a681
commit 1912afc11e
+4
View File
@@ -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 {