mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
fix: remove unusued PerfInfoHandler code (#9328)
- Removes PerfInfo admin API as its not OBDInfo - Keep the drive path without the metaBucket in OBD global latency map. - Remove all the unused code related to PerfInfo API - Do not redefined global mib,gib constants use humanize.MiByte and humanize.GiByte instead always
This commit is contained in:
@@ -80,16 +80,16 @@ func getLocalDrivesOBD(ctx context.Context, parallel bool, endpointZones Endpoin
|
||||
})
|
||||
continue
|
||||
}
|
||||
measurePath := pathJoin(minioMetaTmpBucket, mustGetUUID())
|
||||
measure := func(index int, path string) {
|
||||
latency, throughput, err := disk.GetOBDInfo(ctx, pathJoin(endpoint.Path, minioMetaTmpBucket, mustGetUUID()))
|
||||
driveOBDInfo := madmin.DriveOBDInfo{
|
||||
Path: path,
|
||||
Latency: latency,
|
||||
Throughput: throughput,
|
||||
}
|
||||
var driveOBDInfo madmin.DriveOBDInfo
|
||||
latency, throughput, err := disk.GetOBDInfo(ctx, path, pathJoin(path, measurePath))
|
||||
if err != nil {
|
||||
driveOBDInfo.Error = err.Error()
|
||||
}
|
||||
driveOBDInfo.Path = path
|
||||
driveOBDInfo.Latency = latency
|
||||
driveOBDInfo.Throughput = throughput
|
||||
drivesOBDInfo = append(drivesOBDInfo, driveOBDInfo)
|
||||
wg.Done()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user