fix: should call func globalOSMetrics.time(s)() when updateOSMetrics (#18209)

This commit is contained in:
jiuker 2023-10-12 15:08:13 +08:00 committed by GitHub
parent 6829ae5b13
commit 000928d34e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -105,7 +105,8 @@ func osTrace(s osMetric, startTime time.Time, duration time.Duration, path strin
func updateOSMetrics(s osMetric, paths ...string) func(err error) {
if globalTrace.NumSubscribers(madmin.TraceOS) == 0 {
return func(err error) { globalOSMetrics.time(s) }
osAction := globalOSMetrics.time(s)
return func(err error) { osAction() }
}
startTime := time.Now()

View File

@ -1,3 +1,3 @@
module github.com/minio/minio/docs/debugging/pprofgoparser
go 1.21.1
go 1.21.3

View File

@ -1,6 +1,6 @@
module github.com/minio/minio/docs/debugging/s3-verify
go 1.21.1
go 1.21.3
require github.com/minio/minio-go/v7 v7.0.63