Skip to content

Commit

Permalink
chore: Fix comparison_with_nothing_ms (#18923) (#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 <andrii.korotkov@verkada.com>
  • Loading branch information
andrii-korotkov-verkada authored Jul 10, 2024
1 parent 19e3c1a commit 69908ce
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 69908ce

Please sign in to comment.