GPU사용율수정
This commit is contained in:
@@ -514,7 +514,8 @@ public class InferenceResultDto {
|
||||
@JsonIgnore private float cpu_system;
|
||||
@JsonIgnore private float memused;
|
||||
private Long kbmemused;
|
||||
private float gpuUtil;
|
||||
@JsonIgnore private float gpuMemUsed;
|
||||
@JsonIgnore private float gpuMemTotal;
|
||||
|
||||
// private String cpuStatusName;
|
||||
// private String memStatusName;
|
||||
@@ -526,6 +527,9 @@ 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";
|
||||
@@ -549,7 +553,8 @@ public class InferenceResultDto {
|
||||
|
||||
public String getGpuStatus() {
|
||||
String enumId = "SAFETY";
|
||||
if (this.gpuUtil >= 80) {
|
||||
|
||||
if (this.getGpuUtil() >= 80L) {
|
||||
enumId = "CAUTION";
|
||||
}
|
||||
return enumId;
|
||||
@@ -571,7 +576,7 @@ public class InferenceResultDto {
|
||||
}
|
||||
|
||||
public String getGpuStatusName() {
|
||||
if (this.gpuUtil >= 80) {
|
||||
if (this.getGpuUtil() >= 80) {
|
||||
return ServerStatus.CAUTION.getText();
|
||||
}
|
||||
return ServerStatus.SAFETY.getText();
|
||||
|
||||
@@ -135,7 +135,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
systemMetricEntity.cpuSystem,
|
||||
systemMetricEntity.memused,
|
||||
systemMetricEntity.kbmemused,
|
||||
gpuMetricEntity.gpuUtil))
|
||||
//gpuMetricEntity.gpuUtil,
|
||||
gpuMetricEntity.gpuMemUsed,
|
||||
gpuMetricEntity.gpuMemTotal
|
||||
))
|
||||
.from(systemMetricEntity)
|
||||
.leftJoin(gpuMetricEntity)
|
||||
.on(
|
||||
|
||||
Reference in New Issue
Block a user