re-implement StorageInfo to be a peer call (#16155)

This commit is contained in:
Harshavardhana
2022-12-01 14:31:35 -08:00
committed by GitHub
parent c84e2939e4
commit 5a8df7efb3
20 changed files with 191 additions and 128 deletions

View File

@@ -58,9 +58,9 @@ const (
scannerMetricLastRealtime
// Trace only metrics:
scannerMetricScanFolder // Scan a folder on disk, recursively.
scannerMetricScanCycle // Full cycle, cluster global
scannerMetricScanBucketDisk // Single bucket on one disk
scannerMetricScanFolder // Scan a folder on disk, recursively.
scannerMetricScanCycle // Full cycle, cluster global
scannerMetricScanBucketDrive // Single bucket on one drive
// Must be last:
scannerMetricLast
@@ -181,9 +181,9 @@ func (p *scannerMetrics) getCurrentPaths() []string {
return res
}
// activeDisks returns the number of currently active disks.
// activeDrives returns the number of currently active disks.
// (since this is concurrent it may not be 100% reliable)
func (p *scannerMetrics) activeDisks() int {
func (p *scannerMetrics) activeDrives() int {
var i int
p.currentPaths.Range(func(k, v interface{}) bool {
i++