diff options
| author | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2024-12-06 15:44:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-06 15:44:09 +0100 |
| commit | 8bbc3de611f9a679b5fb542241d32f887b4fe921 (patch) | |
| tree | fd19092f7921359c0cc619693a29b15b8cda2db3 /opendc-compute | |
| parent | 0ce9557b2960979e7e25be7aae05c389d51da17e (diff) | |
Renamed Multiplexer to FlowDistributor (#282)
* Restructured opendc-simulator-flow.
Renamed Multiplexer to FlowDistributor.
* spotless applied
* Added FlowDistributor topologies back
Diffstat (limited to 'opendc-compute')
3 files changed, 7 insertions, 8 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 e1ccdfaf..f34e135d 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 @@ -31,12 +31,12 @@ import org.opendc.compute.simulator.telemetry.GuestCpuStats import org.opendc.compute.simulator.telemetry.GuestSystemStats import org.opendc.compute.simulator.telemetry.HostCpuStats import org.opendc.compute.simulator.telemetry.HostSystemStats -import org.opendc.simulator.Multiplexer import org.opendc.simulator.compute.cpu.CpuPowerModel import org.opendc.simulator.compute.machine.SimMachine import org.opendc.simulator.compute.models.MachineModel import org.opendc.simulator.compute.models.MemoryUnit -import org.opendc.simulator.engine.FlowGraph +import org.opendc.simulator.engine.graph.FlowDistributor +import org.opendc.simulator.engine.graph.FlowGraph import java.time.Duration import java.time.Instant import java.time.InstantSource @@ -62,7 +62,7 @@ public class SimHost( private val graph: FlowGraph, private val machineModel: MachineModel, private val cpuPowerModel: CpuPowerModel, - private val powerMux: Multiplexer, + private val powerMux: FlowDistributor, ) : AutoCloseable { /** * The event listeners registered with this host. 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 8e7293c8..8dcf2fa1 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 @@ -27,9 +27,9 @@ import org.opendc.compute.simulator.host.SimHost import org.opendc.compute.simulator.service.ComputeService import org.opendc.compute.topology.specs.ClusterSpec import org.opendc.compute.topology.specs.HostSpec -import org.opendc.simulator.Multiplexer import org.opendc.simulator.compute.power.SimPowerSource -import org.opendc.simulator.engine.FlowEngine +import org.opendc.simulator.engine.engine.FlowEngine +import org.opendc.simulator.engine.graph.FlowDistributor /** * A [ProvisioningStep] that provisions a list of hosts for a [ComputeService]. @@ -64,7 +64,7 @@ public class HostsProvisioningStep internal constructor( service.addPowerSource(simPowerSource) simPowerSources.add(simPowerSource) - val powerMux = Multiplexer(graph) + val powerMux = FlowDistributor(graph) graph.addEdge(powerMux, simPowerSource) // Create hosts, they are connected to the powerMux when SimMachine is created diff --git a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/HostSpec.kt b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/HostSpec.kt index 1956ffde..0d0dd24d 100644 --- a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/HostSpec.kt +++ b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/HostSpec.kt @@ -33,8 +33,7 @@ import java.util.UUID * @param name The name of the host. * @param meta The metadata of the host. * @param model The physical model of the machine. - * @param cpuPowerModel The [SimPsuFactory] to construct the PSU that models the power consumption of the machine. - * @param multiplexerFactory The [FlowMultiplexerFactory] that is used to multiplex the virtual machines over the host. + * @param cpuPowerModel The [cpuPowerModel] that determines the power draw based on cpu utilization */ public data class HostSpec( val uid: UUID, |
