Compare commits

...

4 Commits

Author SHA1 Message Date
Jason Thomas 12cc640623
Merge aa5da9ea8d into 534f4a9fb1 2025-10-02 08:43:00 +08:00
yangw 534f4a9fb1
fix: timeN function return final closure not be called (#21615)
VulnCheck / Analysis (push) Has been cancelled Details
2025-09-30 23:06:01 -07:00
Jason Thomas aa5da9ea8d
Only update go toolchain 2025-09-07 20:05:04 -06:00
Jason Thomas 4ee0e6e8b4
Update go to 1.24.7 2025-09-07 10:08:50 -06:00
2 changed files with 7 additions and 9 deletions

View File

@ -106,16 +106,14 @@ func (p *scannerMetrics) log(s scannerMetric, paths ...string) func(custom map[s
// time n scanner actions.
// Use for s < scannerMetricLastRealtime
func (p *scannerMetrics) timeN(s scannerMetric) func(n int) func() {
func (p *scannerMetrics) timeN(s scannerMetric) func(n int) {
startTime := time.Now()
return func(n int) func() {
return func() {
duration := time.Since(startTime)
return func(n int) {
duration := time.Since(startTime)
atomic.AddUint64(&p.operations[s], uint64(n))
if s < scannerMetricLastRealtime {
p.latency[s].add(duration)
}
atomic.AddUint64(&p.operations[s], uint64(n))
if s < scannerMetricLastRealtime {
p.latency[s].add(duration)
}
}
}

2
go.mod
View File

@ -2,7 +2,7 @@ module github.com/minio/minio
go 1.24.0
toolchain go1.24.2
toolchain go1.24.7
// Install tools using 'go install tool'.
tool (