Browse Source

FIX 任务,算法,温度 完成

tjf 1 day ago
parent
commit
196dd1126c

+ 8 - 9
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java

@@ -215,15 +215,14 @@ public class Server {
         for (int i = 0; i < gpuInfoList.size(); i++) {
             Gpu gpu = new Gpu();
             System.out.println("\nGPU #" + i + " 信息:");
-            for (Map<String, String> stringStringMap : gpuInfoList) {
-                gpu.setName(stringStringMap.get("名称"));
-                gpu.setGpuMemory(stringStringMap.get("总显存"));
-                gpu.setUseMemory(stringStringMap.get("显存使用"));
-                gpu.setUsed(stringStringMap.get("使用率"));
-                gpu.setTemperature(stringStringMap.get("温度"));
-                gpu.setPower(stringStringMap.get("功耗"));
-                gpuList.add(gpu);
-            }
+            Map<String, String> stringStringMap = gpuInfoList.get(i);
+            gpu.setName(stringStringMap.get("名称"));
+            gpu.setGpuMemory(stringStringMap.get("总显存"));
+            gpu.setUseMemory(stringStringMap.get("显存使用"));
+            gpu.setUsed(stringStringMap.get("使用率"));
+            gpu.setTemperature(stringStringMap.get("温度"));
+            gpu.setPower(stringStringMap.get("功耗"));
+            gpuList.add(gpu);
             gpuInfoList.get(i).forEach((key, value) ->
                     System.out.println("  " + key + ": " + value)
             );