From be9698483f8e7891b5c2d562eaeac9dd3edbf9d8 Mon Sep 17 00:00:00 2001 From: Dante Niewenhuis Date: Fri, 24 Jan 2025 13:54:59 +0100 Subject: 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 --- .../main/kotlin/org/opendc/compute/simulator/internal/Guest.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'opendc-compute/opendc-compute-simulator') 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) { -- cgit v1.2.3