diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-05 14:10:11 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-05 14:10:11 +0200 |
| commit | be176910eb870209576326ffaad8bf21241fccbd (patch) | |
| tree | 3903d8aed5e87850c92e1b2dce8379ea99bdfa6d /opendc-simulator/opendc-simulator-compute/src/jmh | |
| parent | c214a7fe0d46ecc23a71f9237b20281c0ca1c929 (diff) | |
refactor(sim/core): Rename runBlockingSimulation to runSimulation
This change renames the method `runBlockingSimulation` to
`runSimulation` to put more emphasis on the simulation part of the
method. The blocking part is not that important, but this behavior is
still described in the method documentation.
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.kt | 16 |
1 files changed, 8 insertions, 8 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 a2dc9a0f..b319a677 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 @@ -35,7 +35,7 @@ import org.opendc.simulator.compute.workload.SimTrace import org.opendc.simulator.compute.workload.SimTraceWorkload import org.opendc.simulator.flow.FlowEngine import org.opendc.simulator.flow.mux.FlowMultiplexerFactory -import org.opendc.simulator.kotlin.runBlockingSimulation +import org.opendc.simulator.kotlin.runSimulation import org.openjdk.jmh.annotations.* import java.util.SplittableRandom import java.util.concurrent.ThreadLocalRandom @@ -70,18 +70,18 @@ class SimMachineBenchmarks { @Benchmark fun benchmarkBareMetal() { - return runBlockingSimulation { + return runSimulation { val engine = FlowEngine(coroutineContext, clock) val machine = SimBareMetalMachine( engine, machineModel, SimplePowerDriver(ConstantPowerModel(0.0)) ) - return@runBlockingSimulation machine.runWorkload(SimTraceWorkload(trace)) + return@runSimulation machine.runWorkload(SimTraceWorkload(trace)) } } @Benchmark fun benchmarkSpaceSharedHypervisor() { - return runBlockingSimulation { + return runSimulation { val engine = FlowEngine(coroutineContext, clock) val machine = SimBareMetalMachine(engine, machineModel, SimplePowerDriver(ConstantPowerModel(0.0))) val hypervisor = SimHypervisor(engine, FlowMultiplexerFactory.forwardingMultiplexer(), SplittableRandom(1), null) @@ -91,7 +91,7 @@ class SimMachineBenchmarks { val vm = hypervisor.newMachine(machineModel) try { - return@runBlockingSimulation vm.runWorkload(SimTraceWorkload(trace)) + return@runSimulation vm.runWorkload(SimTraceWorkload(trace)) } finally { vm.cancel() machine.cancel() @@ -101,7 +101,7 @@ class SimMachineBenchmarks { @Benchmark fun benchmarkFairShareHypervisorSingle() { - return runBlockingSimulation { + return runSimulation { val engine = FlowEngine(coroutineContext, clock) val machine = SimBareMetalMachine(engine, machineModel, SimplePowerDriver(ConstantPowerModel(0.0))) val hypervisor = SimHypervisor(engine, FlowMultiplexerFactory.maxMinMultiplexer(), SplittableRandom(1), null) @@ -111,7 +111,7 @@ class SimMachineBenchmarks { val vm = hypervisor.newMachine(machineModel) try { - return@runBlockingSimulation vm.runWorkload(SimTraceWorkload(trace)) + return@runSimulation vm.runWorkload(SimTraceWorkload(trace)) } finally { vm.cancel() machine.cancel() @@ -121,7 +121,7 @@ class SimMachineBenchmarks { @Benchmark fun benchmarkFairShareHypervisorDouble() { - return runBlockingSimulation { + return runSimulation { val engine = FlowEngine(coroutineContext, clock) val machine = SimBareMetalMachine(engine, machineModel, SimplePowerDriver(ConstantPowerModel(0.0))) val hypervisor = SimHypervisor(engine, FlowMultiplexerFactory.maxMinMultiplexer(), SplittableRandom(1), null) |
