From b20dd5ebb48465470b9632dc92ecfb1794a8a4bf Mon Sep 17 00:00:00 2001 From: Sacheendra Talluri Date: Thu, 27 Mar 2025 16:14:39 +0100 Subject: Support carbon forecasting in timeshift (#327) * Remove task from scheduler bookkeeping after failure * Support carbon forecasting in timeshift * Register scheduler and carbonmodel in context * Preliminary working task stopping; carbon intensity bug * Working carbon based stop. Two timeshift thresholds * Add a pause state task and guest * Move task stopper to allocation spec * Start tracking num pauses --- .../org/opendc/compute/simulator/scheduler/TimeshiftSchedulerTest.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'opendc-compute/opendc-compute-simulator/src/test') diff --git a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/scheduler/TimeshiftSchedulerTest.kt b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/scheduler/TimeshiftSchedulerTest.kt index b893c1aa..46c6425e 100644 --- a/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/scheduler/TimeshiftSchedulerTest.kt +++ b/opendc-compute/opendc-compute-simulator/src/test/kotlin/org/opendc/compute/simulator/scheduler/TimeshiftSchedulerTest.kt @@ -26,6 +26,7 @@ import io.mockk.every import io.mockk.mockk import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test +import org.opendc.compute.simulator.scheduler.timeshift.TimeshiftScheduler import org.opendc.compute.simulator.service.TaskNature import java.time.Duration import java.time.Instant @@ -43,6 +44,7 @@ class TimeshiftSchedulerTest { weighers = emptyList(), windowSize = 2, clock = clock, + forecast = false, ) val req = mockk() @@ -70,6 +72,7 @@ class TimeshiftSchedulerTest { weighers = emptyList(), windowSize = 2, clock = clock, + forecast = false, ) val req = mockk() -- cgit v1.2.3