From 17fa7619f1d7e96680e018d3f12f333fb75cdac1 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 22 Sep 2022 14:45:12 +0200 Subject: refactor(sim/compute): Make interference domain independent of profile This change updates the virtual machine performance interference model so that the interference domain can be constructed independently of the interference profile. As a consequence, the construction of the topology now does not depend anymore on the interference profile. --- .../src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'opendc-web/opendc-web-runner/src') diff --git a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt index d5dbed1c..b7e550ef 100644 --- a/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt +++ b/opendc-web/opendc-web-runner/src/main/kotlin/org/opendc/web/runner/OpenDCRunner.kt @@ -208,7 +208,7 @@ public class OpenDCRunner( val phenomena = scenario.phenomena val computeScheduler = createComputeScheduler(scenario.schedulerName, seeder) val workload = trace(workloadName).sampleByLoad(workloadFraction) - val (vms, interferenceModel) = workload.resolve(workloadLoader, seeder) + val vms = workload.resolve(workloadLoader, seeder) val failureModel = if (phenomena.failures) @@ -221,8 +221,7 @@ public class OpenDCRunner( clock, computeScheduler, seed = 0L, - failureModel, - interferenceModel.takeIf { phenomena.interference } + failureModel ) val servers = mutableListOf() val reader = ComputeMetricReader(this, clock, simulator.service, servers, monitor) @@ -231,7 +230,7 @@ public class OpenDCRunner( // Instantiate the topology onto the simulator simulator.apply(topology) // Run workload trace - simulator.run(vms, servers) + simulator.run(vms, servers, interference = phenomena.interference) val serviceMetrics = simulator.service.getSchedulerStats() logger.debug { -- cgit v1.2.3