From b0f6402f60ddbba1aad7e198fe6757792337f4d4 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 25 Aug 2021 20:46:36 +0200 Subject: refactor(compute): Measure power draw without PSU overhead This change updates the SimHost implementation to measure the power draw of the machine without PSU overhead to make the results more realistic. --- .../src/main/kotlin/org/opendc/compute/simulator/SimHost.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opendc-compute') diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt index dcc525cb..20e5a9db 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt @@ -114,7 +114,7 @@ public class SimHost( _interferedWork.add(interferedWork) _cpuDemand.record(cpuDemand) _cpuUsage.record(cpuUsage) - _powerUsage.record(machine.psu.powerDraw) + _powerUsage.record(machine.powerDraw) } } ) -- cgit v1.2.3