mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fix: controller duration computation (#6569)
This commit is contained in:
parent
1271784918
commit
bedc6cbd27
1 changed files with 3 additions and 1 deletions
|
@ -150,6 +150,8 @@ func reconcile(ctx context.Context, logger logr.Logger, obj interface{}, r recon
|
|||
}
|
||||
logger = logger.WithValues("key", k, "namespace", ns, "name", n)
|
||||
logger.Info("reconciling ...")
|
||||
defer logger.Info("done", "duration", time.Since(start).String())
|
||||
defer func(start time.Time) {
|
||||
logger.Info("done", "duration", time.Since(start).String())
|
||||
}(start)
|
||||
return r(ctx, logger, k, ns, n)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue