diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-04-21 16:35:52 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-04-21 16:37:18 +0200 |
| commit | 62678b2890a7f3640836b99ca2fec9efd7485929 (patch) | |
| tree | dc6d6e8bb495c019990513511d7ff042afde0f05 /simulator/opendc-experiments/opendc-experiments-energy21/src | |
| parent | 1c0568c31d60d4e690b4b9aec2e14f660b72a5c8 (diff) | |
simulator: Migrate to SimulationCoroutineDispatcher
This change migrates the remainder of the codebase to the
SimulationCoroutineDispatcher implementation.
Diffstat (limited to 'simulator/opendc-experiments/opendc-experiments-energy21/src')
| -rw-r--r-- | simulator/opendc-experiments/opendc-experiments-energy21/src/main/kotlin/org/opendc/experiments/energy21/EnergyExperiment.kt | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/simulator/opendc-experiments/opendc-experiments-energy21/src/main/kotlin/org/opendc/experiments/energy21/EnergyExperiment.kt b/simulator/opendc-experiments/opendc-experiments-energy21/src/main/kotlin/org/opendc/experiments/energy21/EnergyExperiment.kt index e687ad92..e974428c 100644 --- a/simulator/opendc-experiments/opendc-experiments-energy21/src/main/kotlin/org/opendc/experiments/energy21/EnergyExperiment.kt +++ b/simulator/opendc-experiments/opendc-experiments-energy21/src/main/kotlin/org/opendc/experiments/energy21/EnergyExperiment.kt @@ -29,7 +29,6 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.coroutineScope -import kotlinx.coroutines.test.runBlockingTest import mu.KotlinLogging import org.opendc.compute.service.ComputeService import org.opendc.compute.service.scheduler.ComputeScheduler @@ -50,7 +49,7 @@ import org.opendc.simulator.compute.model.MemoryUnit import org.opendc.simulator.compute.model.ProcessingNode import org.opendc.simulator.compute.model.ProcessingUnit import org.opendc.simulator.compute.power.* -import org.opendc.simulator.core.DelayControllerClockAdapter +import org.opendc.simulator.core.runBlockingSimulation import org.opendc.telemetry.sdk.toOtelClock import java.io.File import java.time.Clock @@ -87,8 +86,7 @@ public class EnergyExperiment : Experiment("Energy Modeling 2021") { private val powerModel by anyOf(PowerModelType.LINEAR, PowerModelType.CUBIC, PowerModelType.INTERPOLATION) @OptIn(ExperimentalCoroutinesApi::class) - override fun doRun(repeat: Int): Unit = runBlockingTest { - val clock = DelayControllerClockAdapter(this) + override fun doRun(repeat: Int): Unit = runBlockingSimulation { val chan = Channel<Unit>(Channel.CONFLATED) val allocationPolicy = FilterScheduler( |
