GPU사용율수정

This commit is contained in:
Moon
2026-01-15 14:49:17 +09:00
parent 901c2d7d11
commit 8af0b2ce60
2 changed files with 10 additions and 14 deletions

View File

@@ -514,8 +514,7 @@ public class InferenceResultDto {
@JsonIgnore private float cpu_system;
@JsonIgnore private float memused;
private Long kbmemused;
@JsonIgnore private float gpuMemUsed;
@JsonIgnore private float gpuMemTotal;
private float gpuUtil;
// private String cpuStatusName;
// private String memStatusName;
@@ -527,9 +526,6 @@ public class InferenceResultDto {
public float getCpuUseRate() {
return this.cpu_user + this.cpu_system;
}
public double getGpuUtil() {
return (this.gpuMemUsed / this.gpuMemTotal ) * 100.0;
}
public String getServerStatus() {
String enumId = "SAFETY";
@@ -553,8 +549,7 @@ public class InferenceResultDto {
public String getGpuStatus() {
String enumId = "SAFETY";
if (this.getGpuUtil() >= 80L) {
if (this.gpuUtil >= 80) {
enumId = "CAUTION";
}
return enumId;
@@ -576,7 +571,7 @@ public class InferenceResultDto {
}
public String getGpuStatusName() {
if (this.getGpuUtil() >= 80) {
if (this.gpuUtil >= 80) {
return ServerStatus.CAUTION.getText();
}
return ServerStatus.SAFETY.getText();