From 000928d34efbe1194298f2a17a7e634524f5eb27 Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Thu, 12 Oct 2023 15:08:13 +0800 Subject: [PATCH] fix: should call func globalOSMetrics.time(s)() when updateOSMetrics (#18209) --- cmd/os-instrumented.go | 3 ++- docs/debugging/pprofgoparser/go.mod | 2 +- docs/debugging/s3-verify/go.mod | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/os-instrumented.go b/cmd/os-instrumented.go index c3d03a774..53c417607 100644 --- a/cmd/os-instrumented.go +++ b/cmd/os-instrumented.go @@ -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() diff --git a/docs/debugging/pprofgoparser/go.mod b/docs/debugging/pprofgoparser/go.mod index de77f00ab..0813c0b6f 100644 --- a/docs/debugging/pprofgoparser/go.mod +++ b/docs/debugging/pprofgoparser/go.mod @@ -1,3 +1,3 @@ module github.com/minio/minio/docs/debugging/pprofgoparser -go 1.21.1 +go 1.21.3 diff --git a/docs/debugging/s3-verify/go.mod b/docs/debugging/s3-verify/go.mod index 44c642af5..c733917ac 100644 --- a/docs/debugging/s3-verify/go.mod +++ b/docs/debugging/s3-verify/go.mod @@ -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