All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nohope.test.stress.result.metrics.SystemMetrics Maven / Gradle / Ivy

The newest version!
package org.nohope.test.stress.result.metrics;

/**
 * @author Ketoth Xupack
 * @since 2015-04-29 22:10
 */
public final class SystemMetrics {
    private final double systemLoadAverage;
    private final double systemCpuTime;

    public SystemMetrics(final double systemLoadAverage, final double systemCpuTime) {
        this.systemLoadAverage = systemLoadAverage;
        this.systemCpuTime = systemCpuTime;
    }

    public double getSystemLoadAverage() {
        return systemLoadAverage;
    }

    public double getSystemCpuTime() {
        return systemCpuTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof SystemMetrics)) {
            return false;
        }

        final SystemMetrics that = (SystemMetrics) o;
        return Double.compare(that.systemLoadAverage, systemLoadAverage) == 0 && Double
                .compare(that.systemCpuTime, systemCpuTime) == 0;
    }

    @Override
    public int hashCode() {
        int result = Long.hashCode(Double.doubleToLongBits(systemLoadAverage));
        result = 31 * result + Long.hashCode(Double.doubleToLongBits(systemCpuTime));
        return result;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy