Update some deprecated usages

This commit is contained in:
Chris Eager
2021-11-16 11:54:17 -08:00
committed by Chris Eager
parent 24191d9599
commit 5a99708f56
3 changed files with 3 additions and 4 deletions

View File

@@ -24,6 +24,6 @@ public class CpuUsageGauge extends CachedGauge<Integer> {
@Override
protected Integer loadValue() {
return (int) Math.ceil(operatingSystemMXBean.getSystemCpuLoad() * 100);
return (int) Math.ceil(operatingSystemMXBean.getCpuLoad() * 100);
}
}

View File

@@ -7,7 +7,6 @@ package org.whispersystems.textsecuregcm.metrics;
import com.codahale.metrics.Gauge;
import com.sun.management.OperatingSystemMXBean;
import java.lang.management.ManagementFactory;
public class FreeMemoryGauge implements Gauge<Long> {
@@ -21,6 +20,6 @@ public class FreeMemoryGauge implements Gauge<Long> {
@Override
public Long getValue() {
return operatingSystemMXBean.getFreePhysicalMemorySize();
return operatingSystemMXBean.getFreeMemorySize();
}
}