Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
Signed-off-by: Sidhant Kohli <[email protected]>
  • Loading branch information
kohlisid committed Jan 2, 2025
1 parent 8d0c808 commit f6a8e18
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/mvtxdaemon/server/service/rater/rater_lookback_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ func (r *Rater) updateDynamicLookbackSecs() {
// calculate rates for each look back seconds
vertexName := r.monoVertex.Name
processingTimeSeconds, update := r.CalculateVertexProcessingTime(r.timestampedPodProcessingTime)
r.log.Infof("MYDEBUG: processingTimeSeconds %f ", processingTimeSeconds)
if !update {
return
}
r.log.Debugf("Calulcated processingTimeSeconds for mvtx %s : %f ", vertexName, processingTimeSeconds)
// if the current calculated processing time is greater than the lookback Seconds, update it
currentVal := r.userSpecifiedLookBackSeconds.Load()

// round up to the nearest minute, also ensure that while going up and down we have the consistent value for
// a given processingTimeSeconds, then convert back to seconds
roundedProcessingTime := 60 * int(math.Ceil(processingTimeSeconds/60))
Expand Down

0 comments on commit f6a8e18

Please sign in to comment.