Higher resolution forwarding latency histogram. (#4067)
* Higher resolution forwarding latency histogram. Was using the average latency/jitter of last second to populate forwarding latency/jitter histogram. But, it is too coarse, i. e. the average value of latency/jitter is very low and those summarised samples end up in the lowest bucket always. A few things to address it - record per packet forwarding latency in histogram - adjust histogram bins to include smaller values - Drop jitter histogram This is a per packet call, but prometheus histogram is supposedly fast/light weight. Would be good to get better resolution histograms. Hence doing this. Please let me know if there are performance concerns. * typo * one more typo
This commit is contained in:
@@ -49,6 +49,7 @@ func (s *ForwardStats) Update(arrival, left int64) (int64, bool) {
|
||||
s.lastUpdateAt = arrival
|
||||
s.lock.Unlock()
|
||||
|
||||
prometheus.RecordForwardLatencySample(transit)
|
||||
return transit, isHighForwardingLatency
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user