diff options
| author | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2025-01-07 11:25:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-07 11:25:48 +0100 |
| commit | f71e07f55a5176c5bd5447cdb3bcfebf2f5f47ee (patch) | |
| tree | 9a7e5b11887c560668a17fc2f130bfed7aaceda5 /opendc-compute | |
| parent | c425a03c59e7d5c2e5d82988c61e340a6cbf61fe (diff) | |
Updated the FlowDistributor (#285)
* Updated the FlowDistributor to work in more cases and be more performant.
* Removed old FlowDistributor
Diffstat (limited to 'opendc-compute')
2 files changed, 5 insertions, 5 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/host/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/host/SimHost.kt index f34e135d..cc4ac2d8 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/host/SimHost.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/host/SimHost.kt @@ -62,7 +62,7 @@ public class SimHost( private val graph: FlowGraph, private val machineModel: MachineModel, private val cpuPowerModel: CpuPowerModel, - private val powerMux: FlowDistributor, + private val powerDistributor: FlowDistributor, ) : AutoCloseable { /** * The event listeners registered with this host. @@ -131,7 +131,7 @@ public class SimHost( SimMachine( this.graph, this.machineModel, - this.powerMux, + this.powerDistributor, this.cpuPowerModel, ) { cause -> hostState = if (cause != null) HostState.ERROR else HostState.DOWN diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/provisioner/HostsProvisioningStep.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/provisioner/HostsProvisioningStep.kt index 8dcf2fa1..933b4e63 100644 --- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/provisioner/HostsProvisioningStep.kt +++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/provisioner/HostsProvisioningStep.kt @@ -64,8 +64,8 @@ public class HostsProvisioningStep internal constructor( service.addPowerSource(simPowerSource) simPowerSources.add(simPowerSource) - val powerMux = FlowDistributor(graph) - graph.addEdge(powerMux, simPowerSource) + val powerDistributor = FlowDistributor(graph) + graph.addEdge(powerDistributor, simPowerSource) // Create hosts, they are connected to the powerMux when SimMachine is created for (hostSpec in cluster.hostSpecs) { @@ -78,7 +78,7 @@ public class HostsProvisioningStep internal constructor( graph, hostSpec.model, hostSpec.cpuPowerModel, - powerMux, + powerDistributor, ) require(simHosts.add(simHost)) { "Host with uid ${hostSpec.uid} already exists" } |
