疯狂的狮子li
2021-03-12 2b8ab9cc4d538e2f02e6882b0bfa7934ae7bdbb4
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java
@@ -1,14 +1,13 @@
package com.ruoyi.framework.web.domain.server;
import com.ruoyi.common.utils.Arith;
import cn.hutool.core.util.NumberUtil;
/**
 * CPU相关信息
 * 
 * @author ruoyi
 */
public class Cpu
{
public class Cpu {
    /**
     * 核心数
     */
@@ -39,63 +38,51 @@
     */
    private double free;
    public int getCpuNum()
    {
    public int getCpuNum() {
        return cpuNum;
    }
    public void setCpuNum(int cpuNum)
    {
    public void setCpuNum(int cpuNum) {
        this.cpuNum = cpuNum;
    }
    public double getTotal()
    {
        return Arith.round(Arith.mul(total, 100), 2);
    public double getTotal() {
        return NumberUtil.round(NumberUtil.mul(total, 100), 2).doubleValue();
    }
    public void setTotal(double total)
    {
    public void setTotal(double total) {
        this.total = total;
    }
    public double getSys()
    {
        return Arith.round(Arith.mul(sys / total, 100), 2);
    public double getSys() {
        return NumberUtil.round(NumberUtil.mul(sys / total, 100), 2).doubleValue();
    }
    public void setSys(double sys)
    {
    public void setSys(double sys) {
        this.sys = sys;
    }
    public double getUsed()
    {
        return Arith.round(Arith.mul(used / total, 100), 2);
    public double getUsed() {
        return NumberUtil.round(NumberUtil.mul(used / total, 100), 2).doubleValue();
    }
    public void setUsed(double used)
    {
    public void setUsed(double used) {
        this.used = used;
    }
    public double getWait()
    {
        return Arith.round(Arith.mul(wait / total, 100), 2);
    public double getWait() {
        return NumberUtil.round(NumberUtil.mul(wait / total, 100), 2).doubleValue();
    }
    public void setWait(double wait)
    {
    public void setWait(double wait) {
        this.wait = wait;
    }
    public double getFree()
    {
        return Arith.round(Arith.mul(free / total, 100), 2);
    public double getFree() {
        return NumberUtil.round(NumberUtil.mul(free / total, 100), 2).doubleValue();
    }
    public void setFree(double free)
    {
    public void setFree(double free) {
        this.free = free;
    }
}