mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Run staticcheck on CI (#16170)
This commit is contained in:
@@ -61,6 +61,7 @@ const (
|
||||
scannerMetricScanFolder // Scan a folder on disk, recursively.
|
||||
scannerMetricScanCycle // Full cycle, cluster global
|
||||
scannerMetricScanBucketDrive // Single bucket on one drive
|
||||
scannerMetricCompactFolder // Folder compacted.
|
||||
|
||||
// Must be last:
|
||||
scannerMetricLast
|
||||
@@ -194,7 +195,7 @@ func (p *scannerMetrics) activeDrives() int {
|
||||
|
||||
// lifetime returns the lifetime count of the specified metric.
|
||||
func (p *scannerMetrics) lifetime(m scannerMetric) uint64 {
|
||||
if m < 0 || m >= scannerMetricLast {
|
||||
if m >= scannerMetricLast {
|
||||
return 0
|
||||
}
|
||||
val := atomic.LoadUint64(&p.operations[m])
|
||||
@@ -204,7 +205,7 @@ func (p *scannerMetrics) lifetime(m scannerMetric) uint64 {
|
||||
// lastMinute returns the last minute statistics of a metric.
|
||||
// m should be < scannerMetricLastRealtime
|
||||
func (p *scannerMetrics) lastMinute(m scannerMetric) AccElem {
|
||||
if m < 0 || m >= scannerMetricLastRealtime {
|
||||
if m >= scannerMetricLastRealtime {
|
||||
return AccElem{}
|
||||
}
|
||||
val := p.latency[m].total()
|
||||
|
||||
Reference in New Issue
Block a user