From c3ff23bfe05f7c0be2e10487dc217c2369cb2508 Mon Sep 17 00:00:00 2001 From: Chris Laprun Date: Thu, 1 Feb 2024 20:58:10 +0100 Subject: [PATCH] refactor: clean-up --- .../power/sensors/linux/rapl/IntelRAPLSensor.java | 2 +- .../sustainability/power/sensors/test/TestPowerSensor.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/net/laprun/sustainability/power/sensors/linux/rapl/IntelRAPLSensor.java b/server/src/main/java/net/laprun/sustainability/power/sensors/linux/rapl/IntelRAPLSensor.java index 639ccd0..a7feed0 100644 --- a/server/src/main/java/net/laprun/sustainability/power/sensors/linux/rapl/IntelRAPLSensor.java +++ b/server/src/main/java/net/laprun/sustainability/power/sensors/linux/rapl/IntelRAPLSensor.java @@ -67,7 +67,7 @@ private static boolean isReadable(Path file) { } @Override - public void start(long frequency) throws Exception { + public void start(long frequency) { this.frequency = frequency; // perform an initial measure to prime the data diff --git a/server/src/main/java/net/laprun/sustainability/power/sensors/test/TestPowerSensor.java b/server/src/main/java/net/laprun/sustainability/power/sensors/test/TestPowerSensor.java index de95f34..0fe7f5b 100644 --- a/server/src/main/java/net/laprun/sustainability/power/sensors/test/TestPowerSensor.java +++ b/server/src/main/java/net/laprun/sustainability/power/sensors/test/TestPowerSensor.java @@ -9,6 +9,7 @@ import net.laprun.sustainability.power.sensors.PowerSensor; import net.laprun.sustainability.power.sensors.RegisteredPID; +@SuppressWarnings("unused") public class TestPowerSensor implements PowerSensor { public static final String CPU = "cpu"; public static final SensorMetadata DEFAULT = new SensorMetadata( @@ -37,7 +38,7 @@ public boolean isStarted() { } @Override - public void start(long samplingFrequencyInMillis) throws Exception { + public void start(long samplingFrequencyInMillis) { if (!started) { started = true; }