gpu(darwin): format the string & fix behaviors on intel (#60)

* gpu(darwin): format the string

* gpu(darwin): fix behaviors on intel

* return string directly
This commit is contained in:
UUBulb
2024-09-06 08:31:19 +08:00
committed by GitHub
parent 439be0ddf3
commit 20316996f4
3 changed files with 96 additions and 52 deletions
+1 -1
View File
@@ -350,7 +350,7 @@ func updateGPUStat() float64 {
gs, err := gpustat.GetGPUStat()
if err != nil {
statDataFetchAttempts["GPU"]++
println("gpustat.GetGPUStat error: ", err, ", attempt: ", statDataFetchAttempts["GPU"])
printf("gpustat.GetGPUStat error: %v, attempt: %d", err, statDataFetchAttempts["GPU"])
return 0
} else {
statDataFetchAttempts["GPU"] = 0