diff --git a/opendc-experiments/opendc-experiments-base/src/test/kotlin/org/opendc/experiments/base/ScenarioIntegrationTest.kt b/opendc-experiments/opendc-experiments-base/src/test/kotlin/org/opendc/experiments/base/ScenarioIntegrationTest.kt index 17d62b1a6..9ce25c990 100644 --- a/opendc-experiments/opendc-experiments-base/src/test/kotlin/org/opendc/experiments/base/ScenarioIntegrationTest.kt +++ b/opendc-experiments/opendc-experiments-base/src/test/kotlin/org/opendc/experiments/base/ScenarioIntegrationTest.kt @@ -294,8 +294,8 @@ class ScenarioIntegrationTest { // Note that these values have been verified beforehand assertAll( - { assertEquals(1803918473, monitor.idleTime) { "Idle time incorrect" } }, - { assertEquals(787181527, monitor.activeTime) { "Active time incorrect" } }, + { assertEquals(1803918431, monitor.idleTime) { "Idle time incorrect" } }, + { assertEquals(787181569, monitor.activeTime) { "Active time incorrect" } }, { assertEquals(0, monitor.stealTime) { "Steal time incorrect" } }, { assertEquals(0, monitor.lostTime) { "Lost time incorrect" } }, { assertEquals(6.7565629E8, monitor.energyUsage, 1E4) { "Incorrect energy usage" } }, @@ -341,8 +341,8 @@ class ScenarioIntegrationTest { { assertEquals(0, monitor.tasksActive, "All VMs should finish after a run") }, { assertEquals(0, monitor.attemptsFailure, "No VM should be unscheduled") }, { assertEquals(0, monitor.tasksPending, "No VM should not be in the queue") }, - { assertEquals(43101787433, monitor.idleTime) { "Incorrect idle time" } }, - { assertEquals(3489412567, monitor.activeTime) { "Incorrect active time" } }, + { assertEquals(43101787498, monitor.idleTime) { "Incorrect idle time" } }, + { assertEquals(3489412502, monitor.activeTime) { "Incorrect active time" } }, { assertEquals(0, monitor.stealTime) { "Incorrect steal time" } }, { assertEquals(0, monitor.lostTime) { "Incorrect lost time" } }, { assertEquals(1.0016123392181786E10, monitor.energyUsage, 1E4) { "Incorrect energy usage" } }, diff --git a/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/workload/TraceWorkload.java b/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/workload/TraceWorkload.java index 8e068e1fd..7c73f7e2d 100644 --- a/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/workload/TraceWorkload.java +++ b/opendc-simulator/opendc-simulator-compute/src/main/java/org/opendc/simulator/compute/workload/TraceWorkload.java @@ -140,7 +140,7 @@ private Builder(long checkpointInterval, long checkpointDuration, double checkpo * @param cores The number of cores used during this fragment. */ public void add(long duration, double usage, int cores) { - fragments.add(0, new TraceFragment(duration, usage, cores)); + fragments.add(fragments.size(), new TraceFragment(duration, usage, cores)); } /**