Skip to content

Commit

Permalink
Fix negative pod latencies
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Jan 26, 2023
1 parent 7a3e6bb commit 2a021e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/measurements/pod_latency.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ func (p *podLatency) normalizeMetrics() {
m.InitializedLatency = 0
}
m.PodReadyLatency = int(m.podReady.Sub(m.Timestamp).Milliseconds())
if m.PodReadyLatency < 0 {
m.PodReadyLatency = 0
}
p.normLatencies = append(p.normLatencies, m)
}
}
Expand Down

0 comments on commit 2a021e5

Please sign in to comment.