diff options
| author | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2024-02-14 11:52:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-14 11:52:32 +0100 |
| commit | 10c47102d6133b86e4c39df96fd25a91010a9864 (patch) | |
| tree | e422986118d2475add6677bc1e7bd8ed1913ceb9 /opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc | |
| parent | 616017ba78a0882fe38b9b171b2b0f68e593cd8d (diff) | |
Updated metrics and parquet output (#195)
* Updated metrics and parquet output
* fixed typos
Diffstat (limited to 'opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc')
2 files changed, 7 insertions, 7 deletions
diff --git a/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/SimPsu.java b/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/SimPsu.java index 7f1f97a0..68dae4bf 100644 --- a/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/SimPsu.java +++ b/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/SimPsu.java @@ -43,7 +43,7 @@ public abstract class SimPsu extends SimPowerInlet { /** * Return the instantaneous power usage of the machine (in W) measured at the inlet of the power supply. */ - public abstract double getPowerUsage(); + public abstract double getPowerDraw(); /** * Return the cumulated energy usage of the machine (in J) measured at the inlet of the powers supply. diff --git a/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/SimPsuFactories.java b/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/SimPsuFactories.java index 05b40cf8..5b118429 100644 --- a/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/SimPsuFactories.java +++ b/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/SimPsuFactories.java @@ -82,7 +82,7 @@ public class SimPsuFactories { } @Override - public double getPowerUsage() { + public double getPowerDraw() { return 0; } @@ -123,7 +123,7 @@ public class SimPsuFactories { private double totalUsage; private long lastUpdate; - private double powerUsage; + private double powerDraw; private double energyUsage; private final InHandler handler = new InHandler() { @@ -154,8 +154,8 @@ public class SimPsuFactories { } @Override - public double getPowerUsage() { - return powerUsage; + public double getPowerDraw() { + return powerDraw; } @Override @@ -186,7 +186,7 @@ public class SimPsuFactories { double usage = model.computePower(totalUsage / targetFreq); out.push((float) usage); - powerUsage = usage; + powerDraw = usage; return Long.MAX_VALUE; } @@ -207,7 +207,7 @@ public class SimPsuFactories { long duration = now - lastUpdate; if (duration > 0) { // Compute the energy usage of the machine - energyUsage += powerUsage * duration * 0.001; + energyUsage += powerDraw * duration * 0.001; } } } |
