summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-compute/src/jmh
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-21 20:57:06 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-21 20:57:06 +0200
commitb29f90e5ad5bcac29cde86e56c06e0b65a52cedc (patch)
tree4483016fd06b44edb57ed5d96344c2933452fdb8 /opendc-simulator/opendc-simulator-compute/src/jmh
parentf28cc9964ad1ca1c074331ed54053d469e7373e5 (diff)
simulator: Re-organize compute simulator module
This change re-organizes the classes of the compute simulator module to make a clearer distinction between the hardware, firmware and software interfaces in this module.
Diffstat (limited to 'opendc-simulator/opendc-simulator-compute/src/jmh')
-rw-r--r--opendc-simulator/opendc-simulator-compute/src/jmh/kotlin/org/opendc/simulator/compute/SimMachineBenchmarks.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/opendc-simulator/opendc-simulator-compute/src/jmh/kotlin/org/opendc/simulator/compute/SimMachineBenchmarks.kt b/opendc-simulator/opendc-simulator-compute/src/jmh/kotlin/org/opendc/simulator/compute/SimMachineBenchmarks.kt
index fb753de2..8f60bf05 100644
--- a/opendc-simulator/opendc-simulator-compute/src/jmh/kotlin/org/opendc/simulator/compute/SimMachineBenchmarks.kt
+++ b/opendc-simulator/opendc-simulator-compute/src/jmh/kotlin/org/opendc/simulator/compute/SimMachineBenchmarks.kt
@@ -25,6 +25,9 @@ package org.opendc.simulator.compute
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch
+import org.opendc.simulator.compute.kernel.SimFairShareHypervisor
+import org.opendc.simulator.compute.kernel.SimSpaceSharedHypervisor
+import org.opendc.simulator.compute.model.MachineModel
import org.opendc.simulator.compute.model.MemoryUnit
import org.opendc.simulator.compute.model.ProcessingNode
import org.opendc.simulator.compute.model.ProcessingUnit
@@ -45,7 +48,7 @@ import java.util.concurrent.TimeUnit
class SimMachineBenchmarks {
private lateinit var scope: SimulationCoroutineScope
private lateinit var interpreter: SimResourceInterpreter
- private lateinit var machineModel: SimMachineModel
+ private lateinit var machineModel: MachineModel
@Setup
fun setUp() {
@@ -54,7 +57,7 @@ class SimMachineBenchmarks {
val cpuNode = ProcessingNode("Intel", "Xeon", "amd64", 2)
- machineModel = SimMachineModel(
+ machineModel = MachineModel(
cpus = List(cpuNode.coreCount) { ProcessingUnit(cpuNode, it, 1000.0) },
memory = List(4) { MemoryUnit("Crucial", "MTA18ASF4G72AZ-3G2B1", 3200.0, 32_000) }
)