summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-simulator/src
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-10-31 19:36:45 +0100
committerGitHub <noreply@github.com>2022-10-31 19:36:45 +0100
commit9d06fb04319a50c26599f2da5387a2d03bee15ec (patch)
tree1dd498da02298c9924f6c37974f4311df6948cb2 /opendc-compute/opendc-compute-simulator/src
parentb96acc687f59b698fbc4d4c984d77b008cd4051b (diff)
parentc9750e52a10157f3838b934fed4f04fae69c539a (diff)
merge: Support snapshotting simulated workloads (#113)
This pull request adds support for snapshotting simulated workloads in OpenDC, which serves as the basis for virtual machine migration/suspension support. Part of #32 ## Implementation Notes :hammer_and_pick: * Support synchronous update of FlowStage * Report exceptions in onStop as suppressed * Add support for snapshotting workloads
Diffstat (limited to 'opendc-compute/opendc-compute-simulator/src')
-rw-r--r--opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt6
1 files changed, 1 insertions, 5 deletions
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 b3e56f38..5eccc6ec 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
@@ -280,7 +280,7 @@ public class SimHost(
val bootWorkload = bootModel.get()
val hypervisor = hypervisor
- val hypervisorWorkload = object : SimWorkload {
+ val hypervisorWorkload = object : SimWorkload by hypervisor {
override fun onStart(ctx: SimMachineContext) {
try {
_bootTime = clock.instant()
@@ -296,10 +296,6 @@ public class SimHost(
throw cause
}
}
-
- override fun onStop(ctx: SimMachineContext) {
- hypervisor.onStop(ctx)
- }
}
val workload = if (bootWorkload != null) SimWorkloads.chain(bootWorkload, hypervisorWorkload) else hypervisorWorkload