mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix errors in metrics code on macos (#19965)
- do not load proc fs metrics in case of macos - null-check TimeStat before accessing
This commit is contained in:
@@ -1688,7 +1688,7 @@ func getMinioProcMetrics() *MetricsGroupV2 {
|
||||
cacheInterval: 10 * time.Second,
|
||||
}
|
||||
mg.RegisterRead(func(ctx context.Context) (metrics []MetricV2) {
|
||||
if runtime.GOOS == "windows" {
|
||||
if runtime.GOOS == globalWindowsOSName || runtime.GOOS == globalMacOSName {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user