diff --git a/components/service-waiter/cmd/component.go b/components/service-waiter/cmd/component.go index ed7fdabe15710f..3568c8a96bc92b 100644 --- a/components/service-waiter/cmd/component.go +++ b/components/service-waiter/cmd/component.go @@ -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 }