summaryrefslogtreecommitdiff
path: root/opendc-experiments
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-experiments')
-rw-r--r--opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt22
-rw-r--r--opendc-experiments/opendc-experiments-compute/src/main/kotlin/org/opendc/experiments/compute/HostsProvisioningStep.kt3
-rw-r--r--opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt4
3 files changed, 14 insertions, 15 deletions
diff --git a/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt b/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
index 47058caa..77b0d09f 100644
--- a/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
+++ b/opendc-experiments/opendc-experiments-capelin/src/test/kotlin/org/opendc/experiments/capelin/CapelinIntegrationTest.kt
@@ -120,9 +120,9 @@ class CapelinIntegrationTest {
{ assertEquals(0, monitor.serversActive, "All VMs should finish after a run") },
{ assertEquals(0, monitor.attemptsFailure, "No VM should be unscheduled") },
{ assertEquals(0, monitor.serversPending, "No VM should not be in the queue") },
- { assertEquals(223394204, monitor.idleTime) { "Incorrect idle time" } },
- { assertEquals(66976984, monitor.activeTime) { "Incorrect active time" } },
- { assertEquals(3160316, monitor.stealTime) { "Incorrect steal time" } },
+ { assertEquals(223394101, monitor.idleTime) { "Incorrect idle time" } },
+ { assertEquals(66977086, monitor.activeTime) { "Incorrect active time" } },
+ { assertEquals(3160276, monitor.stealTime) { "Incorrect steal time" } },
{ assertEquals(0, monitor.lostTime) { "Incorrect lost time" } },
{ assertEquals(5.84093E9, monitor.energyUsage, 1E4) { "Incorrect power draw" } }
)
@@ -160,8 +160,8 @@ class CapelinIntegrationTest {
// Note that these values have been verified beforehand
assertAll(
- { assertEquals(10999504, monitor.idleTime) { "Idle time incorrect" } },
- { assertEquals(9741294, monitor.activeTime) { "Active time incorrect" } },
+ { assertEquals(10999514, monitor.idleTime) { "Idle time incorrect" } },
+ { assertEquals(9741285, monitor.activeTime) { "Active time incorrect" } },
{ assertEquals(0, monitor.stealTime) { "Steal time incorrect" } },
{ assertEquals(0, monitor.lostTime) { "Lost time incorrect" } },
{ assertEquals(7.0116E8, monitor.energyUsage, 1E4) { "Incorrect power draw" } }
@@ -199,10 +199,10 @@ class CapelinIntegrationTest {
// Note that these values have been verified beforehand
assertAll(
- { assertEquals(6027979, monitor.idleTime) { "Idle time incorrect" } },
- { assertEquals(14712820, monitor.activeTime) { "Active time incorrect" } },
- { assertEquals(12532979, monitor.stealTime) { "Steal time incorrect" } },
- { assertEquals(445913, monitor.lostTime) { "Lost time incorrect" } }
+ { assertEquals(6028018, monitor.idleTime) { "Idle time incorrect" } },
+ { assertEquals(14712781, monitor.activeTime) { "Active time incorrect" } },
+ { assertEquals(12532934, monitor.stealTime) { "Steal time incorrect" } },
+ { assertEquals(424267, monitor.lostTime) { "Lost time incorrect" } }
)
}
@@ -229,8 +229,8 @@ class CapelinIntegrationTest {
// Note that these values have been verified beforehand
assertAll(
- { assertEquals(10085103, monitor.idleTime) { "Idle time incorrect" } },
- { assertEquals(8539212, monitor.activeTime) { "Active time incorrect" } },
+ { assertEquals(10085111, monitor.idleTime) { "Idle time incorrect" } },
+ { assertEquals(8539204, monitor.activeTime) { "Active time incorrect" } },
{ assertEquals(0, monitor.stealTime) { "Steal time incorrect" } },
{ assertEquals(0, monitor.lostTime) { "Lost time incorrect" } },
{ assertEquals(2328039558, monitor.uptime) { "Uptime incorrect" } }
diff --git a/opendc-experiments/opendc-experiments-compute/src/main/kotlin/org/opendc/experiments/compute/HostsProvisioningStep.kt b/opendc-experiments/opendc-experiments-compute/src/main/kotlin/org/opendc/experiments/compute/HostsProvisioningStep.kt
index 292be929..e224fb84 100644
--- a/opendc-experiments/opendc-experiments-compute/src/main/kotlin/org/opendc/experiments/compute/HostsProvisioningStep.kt
+++ b/opendc-experiments/opendc-experiments-compute/src/main/kotlin/org/opendc/experiments/compute/HostsProvisioningStep.kt
@@ -58,8 +58,7 @@ public class HostsProvisioningStep internal constructor(
spec.uid,
spec.name,
spec.meta,
- ctx.coroutineContext,
- graph,
+ ctx.clock,
machine,
hypervisor,
optimize = optimize
diff --git a/opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt b/opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt
index 4dc3a775..b622362a 100644
--- a/opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt
+++ b/opendc-experiments/opendc-experiments-workflow/src/main/kotlin/org/opendc/experiments/workflow/TraceHelpers.kt
@@ -27,7 +27,7 @@ package org.opendc.experiments.workflow
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
-import org.opendc.simulator.compute.workload.SimFlopsWorkload
+import org.opendc.simulator.compute.workload.SimWorkloads
import org.opendc.trace.Trace
import org.opendc.trace.conv.TABLE_TASKS
import org.opendc.trace.conv.TASK_ALLOC_NCPUS
@@ -74,7 +74,7 @@ public fun Trace.toJobs(): List<Job> {
val submitTime = reader.getInstant(TASK_SUBMIT_TIME)!!
val runtime = reader.getDuration(TASK_RUNTIME)!!
val flops: Long = 4000 * runtime.seconds * grantedCpus
- val workload = SimFlopsWorkload(flops, 1.0)
+ val workload = SimWorkloads.flops(flops, 1.0)
val task = Task(
UUID(0L, id),
"<unnamed>",