summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-simulator/src/main
diff options
context:
space:
mode:
authorDante Niewenhuis <d.niewenhuis@hotmail.com>2024-04-29 12:48:20 +0200
committerGitHub <noreply@github.com>2024-04-29 12:48:20 +0200
commit2dc44c7283200f4689cc1be15115a8b1cd37d456 (patch)
treee815ceb7a2c54ec40ac4072a594687dfe1d95f1b /opendc-compute/opendc-compute-simulator/src/main
parentaefa53bc65309869922d44509739bf2664cf50a5 (diff)
Fixed several cpu related bugs, changed input topology (#226)
Diffstat (limited to 'opendc-compute/opendc-compute-simulator/src/main')
-rw-r--r--opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
index bfd21a3c..84799123 100644
--- a/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
+++ b/opendc-compute/opendc-compute-simulator/src/main/kotlin/org/opendc/compute/simulator/SimHost.kt
@@ -146,7 +146,7 @@ public class SimHost(
override fun canFit(server: Server): Boolean {
val sufficientMemory = model.memoryCapacity >= server.flavor.memorySize
- val enoughCpus = model.cpuCount >= server.flavor.coreCount
+ val enoughCpus = model.coreCount >= server.flavor.coreCount
val canFit = hypervisor.canFit(server.flavor.toMachineModel())
return sufficientMemory && enoughCpus && canFit