summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-simulator/src
diff options
context:
space:
mode:
authorDante Niewenhuis <d.niewenhuis@hotmail.com>2025-01-24 13:54:59 +0100
committerGitHub <noreply@github.com>2025-01-24 13:54:59 +0100
commitbe9698483f8e7891b5c2d562eaeac9dd3edbf9d8 (patch)
tree60b27e2ff80f76c5aa7736ca64f2ae0580348930 /opendc-compute/opendc-compute-simulator/src
parentbb945c2fdd7b20898e3dfccbac7da2a427418216 (diff)
Added Fragment scaling (#296)
* Added maxCpuDemand to TraceWorkload, don't know if this will be needed so might remove later. Updated SimTraceWorkload to properly handle creating checkpoints Fixed a bug with the updatedConsumers in the FlowDistributor Implemented a first version of scaling the runtime of fragments. * small update * updated tests to reflect the changes in the checkpointing model * Updated the checkpointing tests to reflect the changes made * updated wrapper-validation-action * Applied spotless
Diffstat (limited to 'opendc-compute/opendc-compute-simulator/src')
-rw-r--r--opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/internal/Guest.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/internal/Guest.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/internal/Guest.kt
index ee2cb319..7f5f09eb 100644
--- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/internal/Guest.kt
+++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/internal/Guest.kt
@@ -31,8 +31,9 @@ import org.opendc.compute.simulator.telemetry.GuestSystemStats
import org.opendc.simulator.compute.machine.SimMachine
import org.opendc.simulator.compute.machine.VirtualMachine
import org.opendc.simulator.compute.workload.ChainWorkload
-import org.opendc.simulator.compute.workload.TraceFragment
-import org.opendc.simulator.compute.workload.TraceWorkload
+import org.opendc.simulator.compute.workload.trace.TraceFragment
+import org.opendc.simulator.compute.workload.trace.TraceWorkload
+import org.opendc.simulator.compute.workload.trace.scaling.NoDelayScaling
import java.time.Duration
import java.time.Instant
import java.time.InstantSource
@@ -93,6 +94,8 @@ public class Guest(
onStart()
+ val scalingPolicy = NoDelayScaling()
+
val bootworkload =
TraceWorkload(
ArrayList(
@@ -107,6 +110,7 @@ public class Guest(
0,
0,
0.0,
+ scalingPolicy,
)
if (task.workload is TraceWorkload) {