Skip to content

Commit

Permalink
log avg fetch time
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh committed Nov 10, 2023
1 parent cc4cca0 commit 5960757
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/service-waiter/cmd/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ func startWaitFeatureFlag(ctx context.Context, timeout time.Duration) {
shouldSkipComponentWaiter = defaultSkip
return
}
startTime := time.Now()
value, _, fetchTimes := ActualWaitFeatureFlag(featureFlagCtx, client, defaultSkip)
log.WithField("fetchTimes", fetchTimes).WithField("value", value).Info("get final value of feature flag")
avgTime := time.Since(startTime) / time.Duration(fetchTimes)
log.WithField("fetchTimes", fetchTimes).WithField("avgTime", avgTime).WithField("value", value).Info("get final value of feature flag")
shouldSkipComponentWaiter = value
}

Expand Down

0 comments on commit 5960757

Please sign in to comment.