Skip to content

Commit

Permalink
chore: Fix comparison_with_nothing_ms (argoproj#18923) (argoproj#18975)
Browse files Browse the repository at this point in the history
The timing started before reconciliation timing started including get from the queue, leading to very big times reported, not making sense for what's actually going on.

Signed-off-by: Andrii Korotkov <[email protected]>
Signed-off-by: Vegard Færgestad <[email protected]>
  • Loading branch information
andrii-korotkov-verkada authored and Vegard Færgestad committed Jul 22, 2024
1 parent 7f3afbb commit aabb13d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/appcontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,6 @@ func (ctrl *ApplicationController) PatchAppWithWriteBack(ctx context.Context, na
}

func (ctrl *ApplicationController) processAppRefreshQueueItem() (processNext bool) {
ts := stats.NewTimingStats()
patchMs := time.Duration(0) // time spent in doing patch/update calls
setOpMs := time.Duration(0) // time spent in doing Operation patch calls in autosync
appKey, shutdown := ctrl.appRefreshQueue.Get()
Expand Down Expand Up @@ -1575,6 +1574,7 @@ func (ctrl *ApplicationController) processAppRefreshQueueItem() (processNext boo
})

startTime := time.Now()
ts := stats.NewTimingStats()
defer func() {
reconcileDuration := time.Since(startTime)
ctrl.metricsServer.IncReconcile(origApp, reconcileDuration)
Expand Down

0 comments on commit aabb13d

Please sign in to comment.