From 41ad2f2950550fcd95a599bd8869aa191c88396a Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 8 Apr 2021 11:47:01 +0200 Subject: simulator: Divide CPU usage over all cores This change fixes an issue in SimTraceWorkload where the CPU usage was not divided across the cores, but was instead requested for all cores. --- .../test/kotlin/org/opendc/compute/simulator/SimHostTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'simulator/opendc-compute') diff --git a/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt index 830fc868..2a897b28 100644 --- a/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt +++ b/simulator/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/SimHostTest.kt @@ -94,10 +94,10 @@ internal class SimHostTest { mapOf( "workload" to SimTraceWorkload( sequenceOf( - SimTraceWorkload.Fragment(duration * 1000, 28.0, 2), - SimTraceWorkload.Fragment(duration * 1000, 3500.0, 2), + SimTraceWorkload.Fragment(duration * 1000, 2 * 28.0, 2), + SimTraceWorkload.Fragment(duration * 1000, 2 * 3500.0, 2), SimTraceWorkload.Fragment(duration * 1000, 0.0, 2), - SimTraceWorkload.Fragment(duration * 1000, 183.0, 2) + SimTraceWorkload.Fragment(duration * 1000, 2 * 183.0, 2) ), ) ) @@ -109,10 +109,10 @@ internal class SimHostTest { mapOf( "workload" to SimTraceWorkload( sequenceOf( - SimTraceWorkload.Fragment(duration * 1000, 28.0, 2), - SimTraceWorkload.Fragment(duration * 1000, 3100.0, 2), + SimTraceWorkload.Fragment(duration * 1000, 2 * 28.0, 2), + SimTraceWorkload.Fragment(duration * 1000, 2 * 3100.0, 2), SimTraceWorkload.Fragment(duration * 1000, 0.0, 2), - SimTraceWorkload.Fragment(duration * 1000, 73.0, 2) + SimTraceWorkload.Fragment(duration * 1000, 2 * 73.0, 2) ) ) ) -- cgit v1.2.3