spotlessApply 적용

This commit is contained in:
2026-01-22 13:43:21 +09:00
parent 186c20d6e3
commit 890e7c65d3
6 changed files with 56 additions and 87 deletions

View File

@@ -538,14 +538,15 @@ public class InferenceResultDto {
public String getServerStatus() {
String enumId = "SAFETY";
if( this.cpu_user+this.cpu_system+this.gpuUtil+this.kbmemused == 0 )enumId = "FAILUR";
if (this.cpu_user + this.cpu_system + this.gpuUtil + this.kbmemused == 0) enumId = "FAILUR";
// if( this.cpu_user+this.cpu_system >= 80 )enumId = "CAUTION";
return enumId;
}
public String getServerStatusName() {
String enumStr = ServerStatus.SAFETY.getText();
if( this.cpu_user+this.cpu_system+this.gpuUtil+this.kbmemused == 0 )enumStr = ServerStatus.FAILUR.getText();
if (this.cpu_user + this.cpu_system + this.gpuUtil + this.kbmemused == 0)
enumStr = ServerStatus.FAILUR.getText();
return enumStr;
}
@@ -553,8 +554,7 @@ public class InferenceResultDto {
String enumId = "SAFETY";
if (this.cpu_user + this.cpu_system >= 80) {
enumId = "CAUTION";
}
else if (this.cpu_user + this.cpu_system + this.memused == 0) {
} else if (this.cpu_user + this.cpu_system + this.memused == 0) {
enumId = "FAILUR";
}
return enumId;
@@ -564,8 +564,7 @@ public class InferenceResultDto {
String enumId = "SAFETY";
if (this.gpuUtil >= 80) {
enumId = "CAUTION";
}
else if (this.cpu_user + this.cpu_system == 0) {
} else if (this.cpu_user + this.cpu_system == 0) {
enumId = "FAILUR";
}
return enumId;
@@ -575,8 +574,7 @@ public class InferenceResultDto {
String enumId = "SAFETY";
if (this.memused >= 80) {
enumId = "CAUTION";
}
else if (this.cpu_user + this.cpu_system + this.memused == 0) {
} else if (this.cpu_user + this.cpu_system + this.memused == 0) {
enumId = "FAILUR";
}
return enumId;
@@ -585,8 +583,7 @@ public class InferenceResultDto {
public String getCpuStatusName() {
if (this.cpu_user + this.cpu_system >= 80) {
return ServerStatus.CAUTION.getText();
}
else if (this.cpu_user + this.cpu_system + this.memused == 0) {
} else if (this.cpu_user + this.cpu_system + this.memused == 0) {
return ServerStatus.FAILUR.getText();
}
return ServerStatus.SAFETY.getText();
@@ -595,8 +592,7 @@ public class InferenceResultDto {
public String getGpuStatusName() {
if (this.gpuUtil >= 80) {
return ServerStatus.CAUTION.getText();
}
else if (this.cpu_user + this.cpu_system + this.memused == 0) {
} else if (this.cpu_user + this.cpu_system + this.memused == 0) {
return ServerStatus.FAILUR.getText();
}
return ServerStatus.SAFETY.getText();
@@ -605,8 +601,7 @@ public class InferenceResultDto {
public String getMemStatusName() {
if (this.memused >= 80) {
return ServerStatus.CAUTION.getText();
}
else if (this.cpu_user + this.cpu_system + this.memused == 0) {
} else if (this.cpu_user + this.cpu_system + this.memused == 0) {
return ServerStatus.FAILUR.getText();
}
return ServerStatus.SAFETY.getText();

View File

@@ -1,8 +1,5 @@
package com.kamco.cd.kamcoback.inference.service;
import static com.kamco.cd.kamcoback.postgres.entity.QGpuMetricEntity.gpuMetricEntity;
import static com.kamco.cd.kamcoback.postgres.entity.QSystemMetricEntity.systemMetricEntity;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -519,17 +516,16 @@ public class InferenceResultService {
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
List<InferenceServerStatusDto> dtoList = inferenceResultCoreService.getInferenceServerStatusList();
List<InferenceServerStatusDto> dtoList =
inferenceResultCoreService.getInferenceServerStatusList();
int size = dtoList.size();
System.out.println("size ="+size);
System.out.println("size =" + size);
if( size == 0 )
{
for(int k=1; k<=4; k++)
{
if (size == 0) {
for (int k = 1; k <= 4; k++) {
InferenceServerStatusDto dto = new InferenceServerStatusDto();
dto.setServerName("server0"+k);
dto.setServerName("server0" + k);
dto.setCpu_user(0);
dto.setCpu_system(0);
dto.setMemused(0);
@@ -538,22 +534,18 @@ public class InferenceResultService {
dtoList.add(dto);
}
}
else
{
for(int k=1; k<=4; k++)
{
String srvNm = "server"+k;
} else {
for (int k = 1; k <= 4; k++) {
String srvNm = "server" + k;
String srvNmChk = "N";
for (InferenceServerStatusDto dto : dtoList) {
if( srvNm.equals(dto.getServerName()) ){
if (srvNm.equals(dto.getServerName())) {
srvNmChk = "Y";
break;
}
}
if( srvNmChk.equals("N") )
{
if (srvNmChk.equals("N")) {
InferenceServerStatusDto dto = new InferenceServerStatusDto();
dto.setServerName(srvNm);
dto.setCpu_user(0);
@@ -563,9 +555,7 @@ public class InferenceResultService {
dto.setGpuUtil(0);
dtoList.add(dto);
}
}
}
dtoList.sort(Comparator.comparing(InferenceServerStatusDto::getServerName));