处理大屏展示资源使用情况问题
parent
79ca2cfcc2
commit
0c472d7357
|
@ -138,7 +138,7 @@ public class ResourceScreenServiceImpl implements ResourceScreenService {
|
|||
cpuTotal += config.getCpuCore() * config.getCpuAmount() * excessRatio;
|
||||
memTotal += config.getMemoryCapacity().longValue() * excessRatio;
|
||||
} else {
|
||||
cpuTotal += (long) config.getCpuCore() * config.getCpuAmount();
|
||||
cpuTotal += (long) config.getCpuCore() * Optional.ofNullable(config.getCpuAmount()).orElse(0);
|
||||
memTotal += config.getMemoryCapacity().longValue();
|
||||
}
|
||||
diskTotal += config.getDiskCapacity().intValue();
|
||||
|
@ -149,7 +149,7 @@ public class ResourceScreenServiceImpl implements ResourceScreenService {
|
|||
.collect(Collectors.toList());
|
||||
for (com.bocloud.ims.entity.resource.Server opServer : opServers) {
|
||||
com.bocloud.ims.entity.resource.ServerConfig config = opServer.getConfig();
|
||||
cpuTotal += (long) config.getCpuCore() * config.getCpuAmount();
|
||||
cpuTotal += (long) config.getCpuCore() * Optional.ofNullable(config.getCpuAmount()).orElse(0);
|
||||
diskTotal += config.getDiskCapacity().intValue();
|
||||
memTotal += config.getMemoryCapacity().longValue();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue