compute time spent in ILM properly (#19806)

This commit is contained in:
Harshavardhana
2024-05-24 12:28:51 -07:00
committed by GitHub
parent 5659cddc84
commit 443c93c634
3 changed files with 24 additions and 24 deletions

View File

@@ -663,11 +663,12 @@ func genTransitionObjName(bucket string) (string, error) {
// is moved to the transition tier. Note that in the case of encrypted objects, entire encrypted stream is moved
// to the transition tier without decrypting or re-encrypting.
func transitionObject(ctx context.Context, objectAPI ObjectLayer, oi ObjectInfo, lae lcAuditEvent) (err error) {
timeILM := globalScannerMetrics.timeILM(lae.Action)
defer func() {
if err != nil {
return
}
globalScannerMetrics.timeILM(lae.Action)(1)
timeILM(1)
}()
opts := ObjectOptions{