mirror of
https://github.com/minio/minio.git
synced 2026-11-13 14:44:19 +00:00
avoid atomics for self contained reader/writers (#13531)
read/writers are not concurrent in handlers and self contained - no need to use atomics on them. avoids unnecessary contentions where it's not required.
This commit is contained in:
1 parent
c603f85488
commit
db84bb9bd3
2 files changed
+12
-13
No files matched your search
@@ -354,11 +354,11 @@ func setHTTPStatsHandler(h http.Handler) http.Handler {
|
||||
h.ServeHTTP(meteredResponse, r)
|
||||
|
||||
if strings.HasPrefix(r.URL.Path, minioReservedBucketPath) {
|
||||
globalConnStats.incInputBytes(meteredRequest.BytesCount())
|
||||
globalConnStats.incOutputBytes(meteredResponse.BytesCount())
|
||||
globalConnStats.incInputBytes(meteredRequest.BytesRead())
|
||||
globalConnStats.incOutputBytes(meteredResponse.BytesWritten())
|
||||
} else {
|
||||
globalConnStats.incS3InputBytes(meteredRequest.BytesCount())
|
||||
globalConnStats.incS3OutputBytes(meteredResponse.BytesCount())
|
||||
globalConnStats.incS3InputBytes(meteredRequest.BytesRead())
|
||||
globalConnStats.incS3OutputBytes(meteredResponse.BytesWritten())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user